fix: Fix close being called on a collected reference (enforce alias_ref) (#379)

* fix: Fix `close` being called on a collected reference (enforce `alias_ref`)

* Remove `~FrameHostObject` on iOS too
This commit is contained in:
Marc Rousavy
2021-08-20 16:05:02 +02:00
committed by GitHub
parent 97c20d96ae
commit 90f2a1ef7d
7 changed files with 5 additions and 18 deletions

View File

@@ -17,7 +17,6 @@ using namespace facebook;
class JSI_EXPORT FrameHostObject: public jsi::HostObject {
public:
explicit FrameHostObject(Frame* frame): frame(frame) {}
~FrameHostObject();
public:
jsi::Value get(jsi::Runtime&, const jsi::PropNameID& name) override;

View File

@@ -89,10 +89,6 @@ void FrameHostObject::assertIsFrameStrong(jsi::Runtime &runtime, const std::stri
}
}
FrameHostObject::~FrameHostObject() {
close();
}
void FrameHostObject::close() {
if (frame != nil) {
CMSampleBufferInvalidate(frame.buffer);