MCPcopy
hub / github.com/loopbackio/loopback-next / close

Method close

packages/context/src/context.ts:426–430  ·  view source on GitHub ↗

* 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`, *

()

Source from the content-addressed store, hash-verified

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

Callers 15

stopMethod · 0.45
stopMethod · 0.45
stopStubServerFunction · 0.45
context.unit.tsFile · 0.45
utils.jsFile · 0.45
invokeMiddlewareFunction · 0.45
constructorMethod · 0.45
stopMethod · 0.45
stopMethod · 0.45

Calls 1

debugMethod · 0.95

Tested by 2

stopStubServerFunction · 0.36
stopMethod · 0.36