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
This commit is contained in:
Melanie
2009-08-07 03:04:06 +01:00
parent ed3b21ce4e
commit f8d8366bfa
11 changed files with 68 additions and 73 deletions

View File

@@ -35,7 +35,7 @@ using log4net;
namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
{
public class Executor
public class Executor : MarshalByRefObject
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -89,6 +89,26 @@ 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);