[Uml-devel] The need for deleteContents to delete objects in objectList (in umldoc.cpp)
Oliver Kellogg
Oliver.Kellogg at t-online.de
Mon Nov 24 12:31:07 UTC 2003
Brian Thomas wrote:
>
> I think that there is a _definite_ need to be cleaning up
> the objects that arent needed by
> the umldoc anymore, and the correct spot is in umldoc
> deleteContents(). If this functionality
> is ignored I can easily imagine large memory leaks are
> created as there is no way to enforce
> the deletion of these objects (objectList is set to
> autoDelete(false) on purpose). What is the
> solution then?
I agree with your assessment and I'll try to get back
to a more in depth analysis as time permits (if nobody
else does, that is :-)
> An excerpt of commented out code in UMLDoc:
>
> // clear our object list. We do this explicitly since
> // setAutoDelete is false for the objectList now.
> for(UMLObject * obj = objectList.first(); obj != 0;
> obj = objectList.next())
> delete obj;
>
> What objects was this crashing on exactly?
In the cases I've seen it was an ot_Attribute
(not quite sure whether it only happens on that one.)
--Oliver
More information about the umbrello-devel
mailing list