Changing timeout_add and idle_add to _full.
This commit is contained in:
parent
89cfd16c10
commit
6af04a1058
2 changed files with 6 additions and 2 deletions
|
@ -78,7 +78,9 @@ namespace GLib {
|
||||||
IdleProxy p = new IdleProxy (hndlr);
|
IdleProxy p = new IdleProxy (hndlr);
|
||||||
lock (p)
|
lock (p)
|
||||||
{
|
{
|
||||||
p.ID = g_idle_add ((IdleHandlerInternal) p.proxy_handler, IntPtr.Zero);
|
var gch = GCHandle.Alloc(p);
|
||||||
|
var userData = GCHandle.ToIntPtr(gch);
|
||||||
|
p.ID = g_idle_add_full (0, (IdleHandlerInternal) p.proxy_handler, userData, DestroyHelper.NotifyHandler);
|
||||||
Source.AddSourceHandler (p.ID, p);
|
Source.AddSourceHandler (p.ID, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,9 @@ namespace GLib {
|
||||||
TimeoutProxy p = new TimeoutProxy (hndlr);
|
TimeoutProxy p = new TimeoutProxy (hndlr);
|
||||||
lock (p)
|
lock (p)
|
||||||
{
|
{
|
||||||
p.ID = g_timeout_add (interval, (TimeoutHandlerInternal) p.proxy_handler, IntPtr.Zero);
|
var gch = GCHandle.Alloc(p);
|
||||||
|
var userData = GCHandle.ToIntPtr(gch);
|
||||||
|
p.ID = g_timeout_add_full (0, interval, (TimeoutHandlerInternal) p.proxy_handler, userData, DestroyHelper.NotifyHandler);
|
||||||
Source.AddSourceHandler (p.ID, p);
|
Source.AddSourceHandler (p.ID, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue