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 » U++ Library support » U++ Library : Other (not classified elsewhere) » Heap Leaks Detected
Re: Heap Leaks Detected [message #20866 is a reply to message #20864] Wed, 15 April 2009 11:40 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14255
Registered: November 2005
Ultimate Member
mrjt wrote on Wed, 15 April 2009 04:00

cbpporter wrote on Wed, 15 April 2009 08:09

U++ keeps track of dynamic allocation and warns you if you have a memory leak. It means that you have not deleted something that you have newed. The warning will show up as long as you do not correct the memory leak. AFAIK there are some built-in means to help you detect where the leak is, but I have never used them.

By using U++ containers you can avoid having to delete you allocated data in more that 95% of cases (and in almost all of the above cases the call to new also), but U++ lacks an auto_ptr type for the rare cases when you do need to new a single item and delete it at some point.


Doesn't the One<> template provide this functionality?


Definitely.

Although, according to U++ way of thinking (and as it progresses), One is considered to be a containter. And instead of 'new', I believe it is better to use 'Create' for in-place creation.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Small fix for valgrind
Next Topic: Why struct instead of class?
Goto Forum:
  


Current Time: Mon Apr 28 06:21:46 CEST 2025

Total time taken to generate the page: 0.00578 seconds