Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Unified Diff: ppapi/cpp/array_output.cc

Issue 9965080: Change the cpp wrappers of audio input/video capture to use CompletionCallbackWithOutput. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More changes in response to Brett's comments. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/cpp/array_output.h ('k') | ppapi/cpp/dev/audio_input_dev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/array_output.cc
diff --git a/ppapi/cpp/array_output.cc b/ppapi/cpp/array_output.cc
index 4cb8c857b23b0184363422eea3d9d67fd4175531..62252f72562d5d4bd5fc3cbc06b2d861ac72ccce 100644
--- a/ppapi/cpp/array_output.cc
+++ b/ppapi/cpp/array_output.cc
@@ -21,6 +21,13 @@ VarArrayOutputAdapterWithStorage::VarArrayOutputAdapterWithStorage()
set_output(&temp_storage_);
}
+VarArrayOutputAdapterWithStorage::~VarArrayOutputAdapterWithStorage() {
+ if (!temp_storage_.empty()) {
+ // An easy way to release the var references held by this object.
+ output();
+ }
+}
+
std::vector<Var>& VarArrayOutputAdapterWithStorage::output() {
PP_DCHECK(output_storage_.empty());
« no previous file with comments | « ppapi/cpp/array_output.h ('k') | ppapi/cpp/dev/audio_input_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698