MCPcopy
hub / github.com/jabbany/CommentCoreLibrary / deregisterObjectById

Function deregisterObjectById

src/scripting/api/Runtime/Runtime.ts:206–223  ·  view source on GitHub ↗
(objectId:string)

Source from the content-addressed store, hash-verified

204 }
205
206 function deregisterObjectById(objectId:string) {
207 if (Runtime.hasObject(objectId)) {
208 if (objectId.substr(0,2) === '__') {
209 __trace('Runtime.deregisterObject cannot de-register a MetaObject',
210 'warn');
211 return;
212 }
213 __pchannel('Runtime:DeregisterObject', {
214 'id': objectId
215 });
216 if (typeof _registeredObjects[objectId].unload === "function") {
217 // Gracefully unload first
218 _registeredObjects[objectId].unload();
219 }
220 _registeredObjects[objectId] = null;
221 delete _registeredObjects[objectId];
222 }
223 }
224
225 function _getId(type:string = 'obj', container:string = 'rt'):string {
226 var randomSeed:number = Math.random()

Callers 2

deregisterObjectFunction · 0.85
resetFunction · 0.85

Calls 4

__traceFunction · 0.85
__pchannelFunction · 0.85
hasObjectMethod · 0.80
unloadMethod · 0.65

Tested by

no test coverage detected