aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs
diff options
context:
space:
mode:
authorMelanie2009-08-07 03:04:06 +0100
committerMelanie2009-08-07 03:04:06 +0100
commitf8d8366bfa6f048107d22b4b73af22803810be81 (patch)
tree185a7ccc461a03366e1dade1a6f4ecf5d2c8f4f4 /OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs
parentRemove the forge module patch insertion area from prebuild.xml (diff)
downloadopensim-SC_OLD-f8d8366bfa6f048107d22b4b73af22803810be81.zip
opensim-SC_OLD-f8d8366bfa6f048107d22b4b73af22803810be81.tar.gz
opensim-SC_OLD-f8d8366bfa6f048107d22b4b73af22803810be81.tar.bz2
opensim-SC_OLD-f8d8366bfa6f048107d22b4b73af22803810be81.tar.xz
Revert the XEngine memleak patch, it causes premature GC.
This matches behavior seen with an earlier attempt to do this, apparently the sponsor mechanism does't work in Mono
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs12
1 files changed, 4 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs
index 977ac30..a2da14e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs
@@ -32,19 +32,15 @@ using System.Text;
32 32
33namespace OpenSim.Region.ScriptEngine.Shared.Api.Runtime 33namespace OpenSim.Region.ScriptEngine.Shared.Api.Runtime
34{ 34{
35 [Serializable]
35 public class ScriptSponsor : MarshalByRefObject, ISponsor 36 public class ScriptSponsor : MarshalByRefObject, ISponsor
36 { 37 {
37 private bool m_closed = false; 38 // In theory: I execute, therefore I am.
38 39 // If GC collects this class then sponsorship will expire
39 public TimeSpan Renewal(ILease lease) 40 public TimeSpan Renewal(ILease lease)
40 { 41 {
41 if (!m_closed) 42 return TimeSpan.FromMinutes(2);
42 return lease.InitialLeaseTime;
43 return TimeSpan.FromTicks(0);
44 } 43 }
45
46 public void Close() { m_closed = true; }
47
48#if DEBUG 44#if DEBUG
49 // For tracing GC while debugging 45 // For tracing GC while debugging
50 public static bool GCDummy = false; 46 public static bool GCDummy = false;