madCollection should detect Atom leaks

contains all delphi packages mentioned below

madCollection should detect Atom leaks

Postby advwang » Sun Mar 31, 2019 12:41 am

madCollection should detect Atom leaks (AddAtom, DeleteAtom pairs). This kind of leak is very serious. Even if the program exits, Atom will not be released. Many times later, system resources will be exhausted. So after detection, I hope to automatically release the corresponding Atom. Thank you.
advwang
 
Posts: 3
Joined: Fri Mar 15, 2019 4:48 am

Re: madCollection should detect Atom leaks

Postby madshi » Mon Apr 01, 2019 10:16 am

As far as I understand the documentation, AddAtom is "local" and should therefore bereleased when the process goes down? Are you talking about "GlobalAddAtom", maybe? I'm not 100% sure about this, though, because the MS documentation is not very detailed.
madshi
Site Admin
 
Posts: 9985
Joined: Sun Mar 21, 2004 5:25 pm

Re: madCollection should detect Atom leaks

Postby advwang » Tue Apr 02, 2019 3:15 am

Oh, I am sorry, I am talking about GlobalAddAtom., MSDN is like this:

The string associated with the atom is not deleted from memory until its reference count is zero. For more information, see the GlobalDeleteAtom function.
Global atoms are not deleted automatically when the application terminates. For every call to the GlobalAddAtom function, there must be a corresponding call to the GlobalDeleteAtom function.

Now the leak of GlobalAddAtom is not detected, I hope to add detection
In addition, AddAtom also adds detection, as a good habit of programming, thank you for your reply.
advwang
 
Posts: 3
Joined: Fri Mar 15, 2019 4:48 am

Re: madCollection should detect Atom leaks

Postby madshi » Tue Apr 02, 2019 8:19 am

I'll add it to my to do list, but it might take a while until I get to it. Atoms don't really match any other "leak category" I'm currently looking for, so it will require some changes to my code to add a new leak category for it.
madshi
Site Admin
 
Posts: 9985
Joined: Sun Mar 21, 2004 5:25 pm

Re: madCollection should detect Atom leaks

Postby slemmnord » Sat Apr 06, 2019 6:30 pm

I already fixed my vcl atom leaks but still would be nice to have it included. +1 from me :)
slemmnord
 
Posts: 31
Joined: Fri Jan 17, 2014 1:04 am


Return to madCollection

Who is online

Users browsing this forum: No registered users and 3 guests