[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: kdenetwork/librss
From: Frerich Raabe <frerich.raabe () gmx ! de>
Date: 2003-06-17 13:01:10
[Download RAW message or body]
On Tuesday 17 June 2003 12:13, David Faure wrote:
> On Tuesday 17 June 2003 02:44, Frerich Raabe wrote:
> > Tobias' testcase probably gets easily fixed, just by doing something like
> > "m_doc = doc;", read: creating a copy of the parsed Document instance
> > which lives longer than the slot connected to the loadingComplete signal.
>
> Or m_image = doc.image() ? But since image() returns a pointer, this won't
> work. I think it's a bit broken to use refcounting but to also declare that
> the document is the parent of many things. One should be able to store only
> the image, by value (to increase the refcount) and to forget about the
> document, no?
Hm yes, I think having image() return a value might be a step in the right
direction, that way Image's refcount would get increased, and when the
Document goes out of scope it won't take the Image with itself. This is just
a little optimization though because then one stil has to do "Image img =
doc.image();", and then connect to "&img", so that a copy gets created. So
the basic "If you don't create a copy, it will get deleted RSN" problem is
still there.
- Frerich
--
"Irgendwie haben die Leute das mit der Meinungsfreiheit falsch verstanden,
man darf eine Meinung haben, man muss nicht. Wenn man keine Ahnung hat,
einfach mal Fresse halten."
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic