Re: Custom TreeModel



* Emmanuel Rodriguez <emmanuel rodriguez gmail com> [2010-01-17 23:00]:
I'm guessing that the problem occurs because there's no other
variable that holds a reference to the values stored in
TreeIter. Once the method that builds the TreeIter returns the
Perl scalars stored in the iter get reclaimed.

What prevents you from holding onto the strings you pass into the
TreeIter yourself?

This is why I tend to believe that with a pure Perl tree things
will work better as the nodes will still have a refcount of 1.

Youâre going to swap out the entire DOM, and go to a more memory-
hungry and slower approach, just because the strings arenât held
onto, and you arenât willing to hold onto them yourself? Thatâs
not what Iâd doâ but suit yourself I guessâ

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]