Re: [gtk-list] Is this a memleak in GTK ?
- From: Lars Hallberg <lah micropp se>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Is this a memleak in GTK ?
- Date: Fri, 19 Mar 1999 11:09:17 +0100
On Fri, Mar 19, 1999 at 04:48:38PM +0900, Ionutz Borcoman wrote:
> Hi,
>
> I know that this annoy you, but I think we have to find a solution to
> these problems. Here is a simple code (taken from helloworld.c) that
> reports a lot of leaks. Additionaly, the results are random:
Can you do two things:
1 Make g_mem_profile be called from an atexit after the gtk clenup.
I dont realy know howe to do this (sorry) but gtk (init?) regestrer
an function to clear upp gtk. You have to regestrer a funktion
that is run after that to have any chanse att all in getting usefull
result.
2 Use yoer tool and compare the reported leek with what g_mem_profile
reports in use (after abowe change). If this do not match ther is an
real problem (ethere a real leek or a real debuging problems).
If You got this working in some way - a HOWTO would be nice ;-)
Tip: Strostrups "The C++ language" is good to find out what is realy
garantied to work. But I can't find my ex. Why is ther no
office grep utility?
Note as erlier said that You hawe to do the same even if You have a
g_free_all_mem function. If You call such funktion before GTK cleen
up You most likly mess upp ;-). One soulution is to make it an
compile time opten (#define) to make GTK clenup automaticly clean
upp glib memory. But then - if somthing else around longer use
glib? Need some refcounter thing here to be sure (and that mens
everyone have to obey some protokoll when using glib and they
wont cose the trouble only rice when debugging)........
/Lars
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]