[Kst] branches/work/kst/kst1kde4/kst/src/libkst
Barth Netterfield
netterfield at astro.utoronto.ca
Tue Dec 1 20:49:51 CET 2009
On Friday 20 November 2009 12:49:06 Peter Kümmel wrote:
> Replacing sharedptr.h by
>
> #include <QSharedPointer>
> #define SharedPtr QSharedPointer
>
> and removing all inheritance from Shared kills really much.
> The whole hierarchy is in question.
>
> Peter
None-the-less, I think this is what we need to do in order to solve our memory
leakage/fragility issues.
-Delete SharedPtr
-Move all ObjectPtr typedefs to use QSharedPointer
-change all kst_cast to qSharedPointerDynamicCast()
-Make sure there are *no* bare pointers of any Kst::Objects
-Get rid of all explicit destructor calls of any Kst::Objects (especially in
the store).
It will be long and tedious, but we should end up with a much safer system.
After that will be the task of replacing the locks with the QT equivalent, and
making sure they are in the right place, before we go into multi-threading.
Thoughts?
cbn
Currently, we can't do this with ViewObjects, as the QT graphics system holds
them as bare pointers.
More information about the Kst
mailing list