---
lang: en
title: 'API docs: context.contextsubscriptionmanager.close'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/context
permalink: /doc/en/lb4/apidocs.context.contextsubscriptionmanager.close.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [ContextSubscriptionManager](./context.contextsubscriptionmanager.md) &gt; [close](./context.contextsubscriptionmanager.close.md)

## ContextSubscriptionManager.close() method

Close the context: clear observers, stop notifications, and remove event listeners from its parent context.

<b>Signature:</b>

```typescript
close(): void;
```
<b>Returns:</b>

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.


