Skip to content

Commit

Permalink
Suppress now-visible LSan leak and have IM engine shut down any remai…
Browse files Browse the repository at this point in the history
…ning subscriptions.
  • Loading branch information
bzbarsky-apple committed Sep 1, 2022
1 parent e87751e commit afeb46c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/tests/chiptest/lsan-mac-suppressions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ leak:[CHIPToolKeypair signMessageECDSA_RAW:]
# TODO: Figure out how we are managing to leak NSData while using ARC, though
# this may just be a leak deep inside the CFPreferences stuff somewhere.
leak:[CHIPToolPersistentStorageDelegate storageDataForKey:]

# TODO: https://github.com/project-chip/connectedhomeip/issues/22333
leak:[MTRBaseCluster* subscribeAttribute*WithMinInterval:maxInterval:params:subscriptionEstablished:reportHandler:]
5 changes: 5 additions & 0 deletions src/app/InteractionModelEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ void InteractionModelEngine::Shutdown()

mReadHandlers.ReleaseAll();

// Shut down any subscription clients that are still around. They won't be
// able to work after this point anyway, since we're about to drop our refs
// to them.
ShutdownAllSubscriptions();

//
// We hold weak references to ReadClient objects. The application ultimately
// actually owns them, so it's on them to eventually shut them down and free them
Expand Down

0 comments on commit afeb46c

Please sign in to comment.