Menu

#5 Memory leak in CountedPtr<SDWORD>

open
nobody
None
5
2005-03-22
2005-03-22
No

Memory leak in the specialized version of
dtl::CountedPtr<>

Version: 3.6

Bug:

class CountedPtr<SDWORD> leaks 'count' when
DontDelete() has been called.

Proposed Fix:

In dispose(), 'count' should be deleted independantly of
the value of no_delete, as it
is done in the non-specialized version

File: dtl_36/lib/CountedPtr.h:347

- if (count != NULL && --*count ==
0 && !no_delete)
+ if (count != NULL && --*count ==
0)

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.