Skip to content

Commit

Permalink
Add weak reference comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
csnewman committed Feb 8, 2020
1 parent 091ae98 commit 0000c11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flutter-engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ impl FlutterEngineWeakRef {
pub fn is_valid(&self) -> bool {
self.upgrade().is_some()
}

pub fn ptr_equal(&self, other: Self) -> bool {
self.inner.ptr_eq(&other.inner)
}
}

impl Default for FlutterEngineWeakRef {
Expand Down

0 comments on commit 0000c11

Please sign in to comment.