(objectId:string)
| 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() |
no test coverage detected