@@ -212,14 +212,6 @@ export abstract class Client<O extends ClientOptions = ClientOptions> {
212212
213213 protected _promiseBuffer : PromiseBuffer < unknown > ;
214214
215- /**
216- * Cleanup functions to call on dispose.
217- *
218- * NOTE: These callbacks are only invoked by subclasses whose `dispose()` implementation runs them
219- * (currently only `ServerRuntimeClient`). The base `Client.dispose()` is a no-op and will not run them.
220- */
221- protected _disposeCallbacks : ( ( ) => void ) [ ] ;
222-
223215 /**
224216 * Initializes this client instance.
225217 *
@@ -232,7 +224,6 @@ export abstract class Client<O extends ClientOptions = ClientOptions> {
232224 this . _outcomes = { } ;
233225 this . _hooks = { } ;
234226 this . _eventProcessors = [ ] ;
235- this . _disposeCallbacks = [ ] ;
236227 this . _promiseBuffer = makePromiseBuffer ( options . transportOptions ?. bufferSize ?? DEFAULT_TRANSPORT_BUFFER_SIZE ) ;
237228
238229 if ( options . dsn ) {
@@ -1182,13 +1173,12 @@ export abstract class Client<O extends ClientOptions = ClientOptions> {
11821173 * Register a cleanup function to be called when the client is disposed.
11831174 * This is useful for integrations that need to clean up global state.
11841175 *
1185- * NOTE: Registered callbacks are only executed by subclasses whose `dispose()` implementation
1186- * runs them. At the moment that is only `ServerRuntimeClient` (and clients extending it). On the
1187- * base `Client` (e.g. the browser client), `dispose()` is a no-op, so callbacks registered here
1188- * will never be invoked.
1176+ * NOTE: This is a no-op in the base `Client` class. Subclasses like `ServerRuntimeClient`
1177+ * override this method to actually register and execute cleanup callbacks.
11891178 */
1179+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
11901180 public registerCleanup ( callback : ( ) => void ) : void {
1191- this . _disposeCallbacks . push ( callback ) ;
1181+ // No-op in base class - subclasses override to implement cleanup registration
11921182 }
11931183
11941184 /**
0 commit comments