mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
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:
@@ -32,19 +32,15 @@ using System.Text;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.Shared.Api.Runtime
|
||||
{
|
||||
[Serializable]
|
||||
public class ScriptSponsor : MarshalByRefObject, ISponsor
|
||||
{
|
||||
private bool m_closed = false;
|
||||
|
||||
// In theory: I execute, therefore I am.
|
||||
// If GC collects this class then sponsorship will expire
|
||||
public TimeSpan Renewal(ILease lease)
|
||||
{
|
||||
if (!m_closed)
|
||||
return lease.InitialLeaseTime;
|
||||
return TimeSpan.FromTicks(0);
|
||||
return TimeSpan.FromMinutes(2);
|
||||
}
|
||||
|
||||
public void Close() { m_closed = true; }
|
||||
|
||||
#if DEBUG
|
||||
// For tracing GC while debugging
|
||||
public static bool GCDummy = false;
|
||||
|
||||
Reference in New Issue
Block a user