← Back to team overview

team-karma team mailing list archive

[Bug 397243] Re: AutoPointer may have a memory leak

 

RC prefix seems not necessary for AutoPointer as we would not have
AutoPointer which is not referenced counted. Other wise, we have change
the name of even List class as it also has its data reference counted.
Hence, it is best to blankly put that the data storage related classes
use reference counting.

A small change is done to the code sent by you. operator =() now calls
the inline initialise() function.

** Attachment added: "operator =() and initialise()"
   http://launchpadlibrarian.net/28844430/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: Fix Committed

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