Questions tagged [resource-disposal]

5 questions
14
votes
9 answers

How to force a Java thread to close a thread-local database connection

When Using a thread-local database connection, closure of the connection is required when the thread exists. This I can only do if I can override the run() method of the calling thread. Even that is not a great solution, since at time of exit, I…
Joel Shemtov
  • 3,008
  • 2
  • 22
  • 22
4
votes
2 answers

Jenkins Async Resource Disposer issue

So, Jenkins has this async resource disposer plugin which I have it installed. My question: Is there a way to clean up the resources that the plugin collects because if I don't clean up manually, it seems to consume more and more CPU every time?…
Jason
  • 2,246
  • 6
  • 34
  • 53
2
votes
2 answers

How to throw throw from finalizers(of resource objects)

Finalizers are not destructors, finalizers are useless. From what I hear a lot of Java resource Objects dispose on finalize() "just in case". This seems an overly permissive attitude likely to lead to bugs. The least you would want to do is for…
Roman A. Taycher
  • 18,619
  • 19
  • 86
  • 141
2
votes
2 answers

Memory leaks in Delphi app. How to properly dispose objects and strings?

My question is about debugging memory leaks which seem to be a nightmare. In my app there is a simple class derived from TObject. All objects of that class are stored in a collection/list of of the class derived from TObjectList: type TOffer =…
Interface Unknown
  • 713
  • 10
  • 26
1
vote
1 answer

C# How to track down a font disposal

I have a font which is being disposed of which is causing an exception and I can't find where the font is being disposed. I have a feeling it is being disposed of by print preview. Can someone recommend how to track this issue down? Thanks.
Nathan
  • 5,059
  • 16
  • 48
  • 61