Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
only remove weak instance
  • Loading branch information
bparrishMines committed Jun 14, 2022
commit a0871295b518ac9e8c1d109dfb0dcf68940cbe4e
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ class InstanceManager {
/// This does not remove the the weak referenced instance associtated with
/// [identifier]. This can be done with [removeWeakReference].
T? remove<T extends Copyable>(int identifier) {
_weakInstances.remove(identifier);
return _strongInstances.remove(identifier) as T?;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ void main() {
object = NSObject(instanceManager: instanceManager);
instanceManager.addHostCreatedInstance(object, 1);

instanceManager.removeWeakReference(object);
FoundationFlutterApis.instance.object.dispose(1);

expect(instanceManager.containsIdentifier(1), isFalse);
Expand Down