Re: [gtk-list] Re: Gtk--: Tracking down clobbered pointers and mysterious crashes



robert_gasch@peoplesoft.com writes:

> Usually it does but in this case it doesn't. The behaviour
> I'm seeing is that a pointer seems to break without real
> cause

You can always try to put a watchpoint on it, but my experiences with
watchpoints have been rather inconclusive so far. Linking with
electric fence is another solution. Try insure++ as a last resort,
it's not exactly a small tool.

> What I mean is this: rather than allocating pointers and use
> "new Gtk_Widget", I allocate objects and init them with the
> constructor invokation:

[...]

> Is this good, bad, dangerous, safe or just plain crazy?

Very good. The worst thing that can happen to you is that some of your
objects will get too big (through composition with other similarly
built ones), in which case you can always use pointer members in those 
instead.

-- 
					Guillaume.
					http://www.worldnet.fr/~glaurent



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