Re: Problem passing data to g_idle_add
- From: Robert Pearce <rob bdt-home demon co uk>
- To: gtk-list gnome org
- Subject: Re: Problem passing data to g_idle_add
- Date: Tue, 30 Jan 2007 09:05:57 +0000
Hi Melvin,
On Mon, 29 Jan 2007 18:01:19 -0500 you wrote:
> At this time things are working as I had designed, and intended... I am not
> sure why things started working, but they are working so I am not going to
> ask to many questions. Basically I just used a global variable to pass
> information into my update_server_version function. I simply cant figure out
> how to get the g_idle_add() function to pass in the argument without
> mangling the data.
Did you try the strdup() suggestion? Calling g_idle_add only copies the pointer, so normally when people get your "data gets corrupted" symptoms it's because they've passed a pointer to data that goes out of scope. If the address you pass to g_idle_add refers to _static_ data (including allocated heap that won't get free'd until the program terminates) then it should work.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]