team-karma team mailing list archive
-
team-karma team
-
Mailing list archive
-
Message #00001
[Bug 397243] Re: AutoPointer may have a memory leak
I have made some changes to the code. You may check it out in my junk+.
Also i have imported RCAutoPointer, which is tried and tested in another
project of mine. Otherwise you can take it from my attachment. I have
also implemented "operator=(DataType*)" which does essentially the same
thing and it works fine.
** Attachment added: "This has the changes made"
http://launchpadlibrarian.net/28837956/AutoPointer.h
--
AutoPointer may have a memory leak
https://bugs.launchpad.net/bugs/397243
You received this bug notification because you are a member of कर्म,
which is the registrant for कर्म.
Status in Karma - Dynamic Systems Modelling, Simulation and Control: New
Bug description:
the initialise of autopointer calls reset. This calls the ReferenceCounter::reset()->refCount set to 0. Then the reference is set to _ref. which will never be deleted. Is this intensional so that the pointer is NOT deleted?
The name autopointer is misleading for a Reference Counted Autopointer. I suggest refactoring the name to RCAutoPointer at least
References