Popup menus do not release user objects

Report TD 5.x and 6.x bugs and possible workarounds.
e.russo
Italy
Posts: 80
Joined: 16 Feb 2018, 14:02
Location: Turin, Italy

Popup menus do not release user objects

Post by e.russo » 26 Feb 2018, 11:33

Hello,

I discovered that in CTD63 SP1 and CTD61 SP2 popup menus do not release user objects:
after several openings of the popup menus the program crashes (reaches user object limit of 9999 items).

SalReportPrint function in CTD63 sp1 Windows 10 also does NOT release user objects;
Instead CTD63 SP1 WORKS fine under WIN7, WIN8, WIN2012 O.S.
In CTD61 sp1 works correctly at anytime in any O.S. condition

Is it possible to close user objects?
Any idea to solve the problem?

Attached a test program.

Enrico
You do not have the required permissions to view the files attached to this post.

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3447
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Popup menus do not release user objects

Post by Dave Rabelink » 27 Feb 2018, 08:14

As a side note, a handy free external tool to use to check GDI leaks is GDIView. Using the settings you can update the counters automatically and see when they are created and released and show the differences easily:

https://wiki.tdcommunity.net/index.php/S ... ry_process


I tested your sample on the latest TD 6.3.9 version and no leaks are present.
I recall that some earlier TD versions had this and is resolved.
To my knowledge you are unable to fix it yourself as the handles are created and maintained within the TD runtime and are not accessible from outside.
(though you might get a list of opened handles using WinAPI and make a manager which detects new handles and when you know which one to release you can do it from code.
But I think this is a fairly unreliable task)

I'm afraid the best option is to upgrade to the latest TD version.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Return to “Bug Reports”

Who is online

Users browsing this forum: [Ccbot] and 3 guests