On Sat, 2009-03-07 at 18:48 +0100, Murray Cumming wrote: > Eddie, presumably you are implementing a custom model (which will be > difficult enough already), to avoid duplicating a large block of data > inside the regular ListStore or TreeStore. And presumably it's this > block of data that you don't want to allocate dynamically. That, is exactly what I am trying to accomplish. Pardon my inability to explain it in a proper fashion like that. I've already got my derived TreeModel working. That's not the issue. > Can't you just do that and use a pointer to it from inside your > TreeModel, rather than trying to change the memory management of the > treemodel itself? That, is an excellent idea. I guess I got so caught up in trying to keep the whole thing on the stack that that didn't even occur to me. I am still curious however if calling reference(), never allowing the TreeModels refcount to reach zero and manually destructing is safe. Are there any comments on this? While were on the topic. As you may have realized, I don't have much experience with GUIs. Most my experience lies in lower level embedded stuff. I picked gtkmm because I heard it adheres to modern C++ principles better than any gui toolkit out there. My question is: is the heavy reliance on dynamic allocation common in the gui toolkit world? Murray, I read on your website that you and your lot do work on embedded devices. Do you use gtkmm for such projects? I prefer to stay clear of non-C++ (GTK+) if I can. I really don't agree with the idea that C++ is unfit for low computing power embedded devices. I figure it all comes down to how it is used. -- Eddie Carle This message has been signed with an RFC4880 signature. It is guaranteed to have originated from Eddie Carle and it's contents can be validated against it's signature.
Attachment:
signature.asc
Description: This is a digitally signed message part