]> git.sesse.net Git - nageru/blobdiff - ref_counted_frame.cpp
Refcount the input frames directly instead of trying to free them after-the-fact...
[nageru] / ref_counted_frame.cpp
diff --git a/ref_counted_frame.cpp b/ref_counted_frame.cpp
new file mode 100644 (file)
index 0000000..725291e
--- /dev/null
@@ -0,0 +1,7 @@
+#include "ref_counted_frame.h"
+
+void release_refcounted_frame(FrameAllocator::Frame *frame)
+{
+       frame->owner->release_frame(*frame);
+       delete frame;
+}