Another stab at cmickeyb's patch for script GC.

Moved the Close() for the appdomain-hosted parts into a new destructor
on ScriptInstance.
This commit is contained in:
Melanie
2009-08-07 20:43:23 +01:00
parent 2148f84e1e
commit 4ee8d8a813
11 changed files with 69 additions and 68 deletions

View File

@@ -35,7 +35,7 @@ using log4net;
namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
{
public class Executor : MarshalByRefObject
public class Executor
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -89,26 +89,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
initEventFlags();
}
/// <summary>
/// Make sure our object does not timeout when in AppDomain. (Called by ILease base class)
/// </summary>
/// <returns></returns>
public override Object InitializeLifetimeService()
{
//m_log.Debug("Executor: InitializeLifetimeService()");
// return null;
ILease lease = (ILease)base.InitializeLifetimeService();
if (lease.CurrentState == LeaseState.Initial)
{
lease.InitialLeaseTime = TimeSpan.Zero; // TimeSpan.FromMinutes(1);
// lease.SponsorshipTimeout = TimeSpan.FromMinutes(2);
// lease.RenewOnCallTime = TimeSpan.FromSeconds(2);
}
return lease;
}
public scriptEvents GetStateEventFlags(string state)
{
//m_log.Debug("Get event flags for " + state);