Quoting bulia byak <buliabyak@...400...>:
On Tue, 8 Mar 2005 18:31:01 -0500, mental@...3... <mental@...3...> wrote:
Yes, finish reworking the NRArenaItems to no longer reference SPStyle (which, in turn, references the gradients...).
Actually, now that I think of it, why do NRArenaItems have to reference style at all? If an NRArenaItem uses it, this means its parent SPItem also uses and references it, so there's no danger it will be deleted from under the NRArenaItem. Can we just remove the referencing? Or am I missing something?
For various architectural reasons, there's a delay between the parent SPItem going away and the NRArenaItem going away. If the SPStyle weren't reffed by the NRArenaItem, it would get freed early most likely resulting in a (hard-to-reproduce) crash.
[ As a rule, "removing the referencing" when there is still an outstanding pointer is never a fix... ]
Now, what might be possible is if the SPItem set the NRArenaItem's style to NULL or something (if NRArenaItem were rewritten to deal with a NULL style).
But I'd rather just finish the job of detangling NRArenaItem and SPStyle anwyay... it's one of the biggest roadblocks to cleaning up the SPStyle code.
Mostly it just means the NRArenaItem (or NRArenaItem subclass) storing its own copies of the SPStyle fields it cares about, and after that redoing SPItem (or relevent subclass) to set them directly via accessors, rather than letting the NRArenaItem copy them from an SPStyle.
Desired end result: NRArenaItem and subclasses no longer need to know anything about SPStyle
-mental