Skip to content

Commit

Permalink
Modify delete -> memoryfree
Browse files Browse the repository at this point in the history
  • Loading branch information
joonhaengHeo committed Apr 12, 2023
1 parent a0fc432 commit 1247399
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/darwin/Framework/CHIP/MTRBaseDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ static void PurgeReadClientContainers(
asyncDispatchToMatterQueue:^() {
for (MTRReadClientContainer * container in listToDelete) {
if (container.readClientPtr) {
Platform::Delete(container.readClientPtr);
Platform::MemoryFree(container.readClientPtr);
container.readClientPtr = nullptr;
}
if (container.pathParams) {
Platform::Delete(container.pathParams);
Platform::MemoryFree(container.pathParams);
container.pathParams = nullptr;
}
}
Expand Down Expand Up @@ -1254,11 +1254,11 @@ - (void)subscribeWithAttributePaths:(NSArray<MTRAttributeRequestPath *> * _Nulla
}
Platform::Delete(readClient);
if (container.pathParams != nullptr) {
Platform::Delete(container.pathParams);
Platform::MemoryFree(container.pathParams);
}

if (container.eventPathParams != nullptr) {
Platform::Delete(container.eventPathParams);
Platform::MemoryFree(container.eventPathParams);
}
container.pathParams = nullptr;
container.eventPathParams = nullptr;
Expand Down

0 comments on commit 1247399

Please sign in to comment.