diff options
Diffstat (limited to 'ppapi/cpp/array_output.cc')
-rw-r--r-- | ppapi/cpp/array_output.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ppapi/cpp/array_output.cc b/ppapi/cpp/array_output.cc index 4cb8c85..62252f7 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()); |