mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
Scripts no longer crash sim after 5 minutes (override InitializeLifetimeService). Loading/Unloading of scripts are now handled in separate thread so server is no delayed because of this. Each script is loaded into a single AppDomain (temporary test for script unload, eats ~15KB more memory for each script). Unload of scripts has been verified to free up memory.
This commit is contained in:
@@ -62,7 +62,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
||||
{
|
||||
// Add to queue for all scripts in ObjectID object
|
||||
//myScriptEngine.m_logger.Verbose("ScriptEngine", "EventManager Event: touch_start");
|
||||
Console.WriteLine("touch_start localID: " + localID);
|
||||
//Console.WriteLine("touch_start localID: " + localID);
|
||||
myScriptEngine.myEventQueueManager.AddToObjectQueue(localID, "touch_start", new object[] { (int)1 });
|
||||
}
|
||||
public void OnRezScript(uint localID, LLUUID itemID, string script)
|
||||
@@ -85,6 +85,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
||||
// Path.Combine("ScriptEngines", "Default.lsl"),
|
||||
// new OpenSim.Region.Environment.Scenes.Scripting.NullScriptHost()
|
||||
//);
|
||||
Console.WriteLine("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString());
|
||||
myScriptEngine.myScriptManager.StopScript(
|
||||
localID,
|
||||
itemID
|
||||
@@ -96,7 +97,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
||||
// These needs to be hooked up to OpenSim during init of this class
|
||||
// then queued in EventQueueManager.
|
||||
// When queued in EventQueueManager they need to be LSL compatible (name and params)
|
||||
public void state_entry() { }
|
||||
|
||||
//public void state_entry() { } //
|
||||
public void state_exit() { }
|
||||
//public void touch_start() { }
|
||||
public void touch() { }
|
||||
|
||||
Reference in New Issue
Block a user