Skip to content

Commit

Permalink
add a TODO to remove repeated calls to set persistent storage delegate
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-apple committed Feb 15, 2021
1 parent 1356a8d commit 4368420
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ void CHIPSetNextAvailableDeviceID(uint64_t id)
dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.persistentstorage.callback", DISPATCH_QUEUE_SERIAL);

CHIPDeviceController * controller = [CHIPDeviceController sharedController];
// TODO: setting persistent storage delegate repeatedly is wasteful. This is being done here, and in
// GetPairedDevice() on every call. The delegate should be set once at the controller init time.
[controller setPersistentStorageDelegate:storage queue:callbackQueue];

NSError * error;
Expand Down

0 comments on commit 4368420

Please sign in to comment.