[Gtk-sharp-list] Gtk# TreeViews/Iterators

32bitkid jim at 32bitkid.com
Fri Feb 9 10:50:40 EST 2007


I've got an application that has a fairly large TreeView set, that often
changes significantly. Its easier for me to just clear the model (
TreeStore.Clear() ) and refill it with new data.

However, doing that appears to cause some serious memory leaks, in the range
of megabytes on store rebuild. Its more or less as if clearing the store
isn't doing anything in terms of releasing memory, so I just keep adding
onto the store.

For the life of me, I can't figure it out and I'm thinking that maybe there
are a bunch of iterators pointing to dead objects, and keeping a good chunk
of the data.

I think that python has an "invalidate_iter" function, to force an iterator
to be invalidated and able to be collected by the garbage collection. I was
wondering if anything like that exists for Gtk#, you can check to see if an
iterator is invalid, but not actively set it to invalid.

That or I'm just using TreeViews completely incorrectly.

Any help would be much appriciated. Thank you.
-- 
View this message in context: http://www.nabble.com/Gtk--TreeViews-Iterators-tf3201093.html#a8888149
Sent from the Mono - Gtk# mailing list archive at Nabble.com.



More information about the Gtk-sharp-list mailing list