Re: memory leaks (continued)



Hello iain,

For the simple reason that the data contained therein is dynamic. Going from one page to another and changing any settings effects what and how information is displayed on any other page. I'm sure I could setup and event handler for this, but it would be very complicated and would possibly interfere with settings as I change them, and because I'm lazy. So in order to deal with this situation my design had to destroy and recreate moving from one page to another.

Actually ...for this particular problem I found out what I was doing wrong! Or because I am not intimate enough with the design of GTK+ and since documentation is not that good, I did not realize that I should not manually set the reference count for each widget every time it is created unless I have a good reason to do so. This apparently keeps the object from cleaning itself out if this count is not down to zero, possibly a design inheritance from OOP smart pointers. Once I removed my calls to gtk_widget_ref(), destroying them actually makes them go away:) Now I'm happy

-William

At 02:53 AM 2/16/2002 +0000, you wrote:
On Fri, 2002-02-15 at 20:57, wdulyea1 excite com wrote: An expansion to
an earlier mail I sent... In this code snippet below I can observ that
removing(destroying) container widgets does not have the desired effect.
Please comment:>

What specific reason do you need to delete the widgets on a page when
the page is changed?

iain
--
"All men of conscience or prudence ply to windward, to maintain their
wars to be defensive." -- Roger Williams




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