[Muine] [PATCH] garbage collected delegates in Player.cs with mono cvs
- From: Ross Girshick <ross girshick gmail com>
- To: muine-list gnome org
- Subject: [Muine] [PATCH] garbage collected delegates in Player.cs with mono cvs
- Date: Mon, 20 Sep 2004 22:52:05 -0400
Hi,
I recently upgraded to a CVS build of mono and found that Muine
started crashing with a nasty garbage collected delegate message.
Here's a small patch to fix that problem.
Thank you for Muine!
Ross
--
"Magic is real, unless declared integer."
Index: Player.cs
===================================================================
RCS file: /cvs/gnome/muine/src/Player.cs,v
retrieving revision 1.16
diff -r1.16 Player.cs
184a185,191
> /* These must be static so that the GC doesn't collect them while the unmanaged code is expecting
> * them to still exist.
> */
> static IntSignalDelegate TickCallbackHandler;
> static SignalDelegate EosCallbackHandler;
> static StringSignalDelegate ErrorCallbackHandler;
>
194a202,205
>
> TickCallbackHandler = new IntSignalDelegate (TickCallback);
> EosCallbackHandler = new SignalDelegate (EosCallback);
> ErrorCallbackHandler = new StringSignalDelegate (ErrorCallback);
196c207
< ConnectInt.g_signal_connect_data (Raw, "tick", new IntSignalDelegate (TickCallback),
---
> ConnectInt.g_signal_connect_data (Raw, "tick", TickCallbackHandler,
198c209
< Connect.g_signal_connect_data (Raw, "end_of_stream", new SignalDelegate (EosCallback),
---
> Connect.g_signal_connect_data (Raw, "end_of_stream", EosCallbackHandler,
200c211
< ConnectString.g_signal_connect_data (Raw, "error", new StringSignalDelegate (ErrorCallback),
---
> ConnectString.g_signal_connect_data (Raw, "error", ErrorCallbackHandler,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]