summaryrefslogtreecommitdiff
path: root/src/TestPlugin.cs
diff options
context:
space:
mode:
authorAlp Toker <alp@atoker.com>2006-08-21 13:00:59 +0100
committerAlp Toker <alp@atoker.com>2006-08-21 13:00:59 +0100
commit1cfb1868dc8250a757d2024d7731befb77469b3b (patch)
tree590038a96ca657e0c4151261676ee8579e3903f3 /src/TestPlugin.cs
parentf2c266a9b7d9e4f6a7b6c4efc844003881348207 (diff)
downloadcompiz-cil-1cfb1868dc8250a757d2024d7731befb77469b3b.tar.gz
compiz-cil-1cfb1868dc8250a757d2024d7731befb77469b3b.tar.bz2
Keep references of delegates and other objects
These slipped through since I had GC_DONT_GC=1 in a launch script. Works fine with the GC enabled and memory use for noop plugins is static.
Diffstat (limited to 'src/TestPlugin.cs')
-rw-r--r--src/TestPlugin.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/TestPlugin.cs b/src/TestPlugin.cs
index 32def9f..feb6f01 100644
--- a/src/TestPlugin.cs
+++ b/src/TestPlugin.cs
@@ -3,11 +3,13 @@ using Compiz;
public class MtestPlugin : Plugin
{
+ Screen s;
+
public override bool InitScreen (IntPtr plugin, IntPtr screen)
{
Console.WriteLine ("initScreen");
- Screen s = new Screen (screen);
+ s = new Screen (screen);
s.PreparePaint += OnPreparePaintScreen;
s.Paint += OnPaintScreen;