Page Contents
Home > @loopback/context > ContextSubscriptionManager > close
ContextSubscriptionManager.close() method
Close the context: clear observers, stop notifications, and remove event listeners from its parent context.
Signature:
close(): void;
Returns:
void
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
, which is created per request.