We are having trouble with the memory leak, which occurs only when the application is running (when we shut down So there is no fastmm report application).
We separate this problem from a method that reads the values from the database and provides the objects immediately from the result. (We are using DBXpress for database connection)
The class implements an interface that stores the database. Using a testing app that does nothing to run thread reading values from the database (always the same value), applications do not leak in Delphi 7, but the use of memory in Delphi 2007 is very fast. This is the same code, the same exam application.
When you check the application with EkTime, you can see the number of TStringList, TList, etc. (all objects use the database class) are increasing and shrinking - but check ProXplorer and Memory with the Windows Task Manager, the Delphi 2007 Edition really grows fast.
Our only guess is that with the release of Delphi 7 and Delphi 2007's interface something is different. Does this mean the meaning?
Good ... my 2 cents:
The way Delphi 2007 interface Works with, there is nothing different. But a long time ago I had a similar problem with the interface, and I did not use the interface reference count at all. It does not really work well
You have not posted the source, but I think your implementing executable objects are inherited from TInterfacedOject, am I right? If so, you should consider the owner of TInterfacedObject to replace it, which will not apply to the reference count methods. Instead of having to deal with Delphi, you have to destroy your objects.
One other thing that you can understand is to tell delphi that you are not using the interface object, so that the interface is not using the object.
But as everyone said on the comment, if FastM is not reporting a leak, then they have no leak. The fact is that memory is increasing rapidly, does not indicate that your program is leaking. It only says that you do not pay attention to your things as you wanted
you should use it. This is a very good additive that reports memory leaks and their callstack.
Also, take a look at this
Comments
Post a Comment