Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » CTRL + C = 659 Heap leaks
Re: CTRL + C = 659 Heap leaks [message #52071 is a reply to message #52070] Mon, 15 July 2019 20:18 Go to previous messageGo to previous message
Novo is currently offline  Novo
Messages: 934
Registered: December 2006
Experienced Contributor
mirek wrote on Mon, 15 July 2019 13:35
Novo wrote on Mon, 15 July 2019 17:16
mirek wrote on Mon, 15 July 2019 02:17
Novo wrote on Mon, 15 July 2019 06:15

This is not a correct behavior.


There is no correct behaviour. This is not defined anywhere in c++ standard.

Mirek

In this case this is a bug with U++. MemDiagCls shouldn't be a global object. It should be created on stack (by GUI_APP_MAIN or by CONSOLE_APP_MAIN). IMHO.


Then it would not work. Think about all that memory allocated in global objects... (and worse, not in initialization phase).

Instead of MemDiagCls you can put on stack a guard-object, which will detect that its destructor got called and set a flag on MemDiagCls.
IMHO, the problem is fixable ...


Regards,
Novo
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How i can play a sound?? wav,mp3,ogg,aiff????
Next Topic: Filtering an ArrayCtrl
Goto Forum:
  


Current Time: Thu Apr 09 09:37:41 CEST 2020

Total time taken to generate the page: 0.01453 seconds