* Close the context: clear observers, stop notifications, and remove event * listeners from its parent context. * * @remarks * This method MUST be called to avoid memory leaks once a context object is * no longer needed and should be recycled. An example is the `RequestContext`, *
()
| 424 | * which is created per request. |
| 425 | */ |
| 426 | close() { |
| 427 | this.debug('Closing context...'); |
| 428 | this.subscriptionManager.close(); |
| 429 | this.tagIndexer.close(); |
| 430 | } |
| 431 | |
| 432 | /** |
| 433 | * Check if an observer is subscribed to this context |