aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs
blob: 13c25d794da78cbd2526911ef0b5285bd413694d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using System.Collections.Generic;
using System.Runtime.Remoting.Lifetime;
using System.Text;

namespace OpenSim.Region.ScriptEngine.Shared.Api.Runtime
{
    [Serializable]
    public class ScriptSponsor : MarshalByRefObject, ISponsor
    {
        // In theory: I execute, therefore I am.
        // If GC collects this class then sponsorship will expire
        public TimeSpan Renewal(ILease lease)
        {
            return TimeSpan.FromMinutes(2);
        }
#if DEBUG
        // For tracing GC while debugging
        public static bool GCDummy = false;
        ~ScriptSponsor()
        {
            GCDummy = true;
        }
#endif
    }
}