HomePhorge

fix a memleak caused by a shared_ptr cycle: Resource holds a Model copy…
db5345280c89Unpublished

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

fix a memleak caused by a shared_ptr cycle: Resource holds a Model copy, which has a shared_ptr<ModelPrivate>, which in turn has a shared_ptr to the resources. That way RDF models never got destructed. Break the cycle by holding weak_ptr's to ModelPrivate in Resource and Statement. That would break cases where only a ResourcePtr is kept and no Model copy, thus keep a Model copy in ResourceWrapper so that the model is not destroyed until the last Resource/ResourceWrapper refering to that model goes out of scope.

svn path=/trunk/KDE/kdepimlibs/; revision=924447

Details

Event Timeline

Frank Osterfeld <frank.osterfeld@kdemail.net> committed rKPLdb5345280c89: fix a memleak caused by a shared_ptr cycle: Resource holds a Model copy… (authored by Frank Osterfeld <frank.osterfeld@kdemail.net>).Feb 10 2009, 9:23 PM