aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorTedd Hansen2008-11-26 11:12:57 +0000
committerTedd Hansen2008-11-26 11:12:57 +0000
commite6ddb5de7de4ed61fa19b3805cd77104328eb20a (patch)
tree37c975b8d660174d96c05830daf7aab92eaf2309 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentComment one more field that can't be tested that way anymore (diff)
downloadopensim-SC-e6ddb5de7de4ed61fa19b3805cd77104328eb20a.zip
opensim-SC-e6ddb5de7de4ed61fa19b3805cd77104328eb20a.tar.gz
opensim-SC-e6ddb5de7de4ed61fa19b3805cd77104328eb20a.tar.bz2
opensim-SC-e6ddb5de7de4ed61fa19b3805cd77104328eb20a.tar.xz
Attempt to give script objects a proper lease time (DNE and xengine). Relies on GC. Also removed lease for LSL_Api as it strictly speaking should not be MarshalByRef. Or should it? If so I broke scripting! :)
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs14
1 files changed, 3 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 17dca98..cbd99bb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Runtime.Remoting.Lifetime; 31using System.Runtime.Remoting.Lifetime;
32using System.Security.Permissions;
32using System.Text; 33using System.Text;
33using System.Threading; 34using System.Threading;
34using Nini.Config; 35using Nini.Config;
@@ -64,7 +65,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
64 /// <summary> 65 /// <summary>
65 /// Contains all LSL ll-functions. This class will be in Default AppDomain. 66 /// Contains all LSL ll-functions. This class will be in Default AppDomain.
66 /// </summary> 67 /// </summary>
67 public class LSL_Api : MarshalByRefObject, ILSL_Api, IScriptApi 68 public class LSL_Api : ILSL_Api, IScriptApi
68 { 69 {
69 protected IScriptEngine m_ScriptEngine; 70 protected IScriptEngine m_ScriptEngine;
70 protected SceneObjectPart m_host; 71 protected SceneObjectPart m_host;
@@ -98,17 +99,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
98 AsyncCommands = new AsyncCommandManager(ScriptEngine); 99 AsyncCommands = new AsyncCommandManager(ScriptEngine);
99 } 100 }
100 101
101 // Object never expires
102 public override Object InitializeLifetimeService()
103 {
104 ILease lease = (ILease)base.InitializeLifetimeService();
105 102
106 if (lease.CurrentState == LeaseState.Initial) 103
107 {
108 lease.InitialLeaseTime = TimeSpan.Zero;
109 }
110 return lease;
111 }
112 104
113 protected void ScriptSleep(int delay) 105 protected void ScriptSleep(int delay)
114 { 106 {