eolian-cxx: Release iterators

Summary:
When the iterators advanced, the CXX wrappers null'd them but did not
call eina_value_free.

ref T8280

Reviewers: q66, brunobelo, felipealmeida

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8280

Differential Revision: https://phab.enlightenment.org/D10238
devs/bu5hm4n/test-try
Lauro Moura 4 years ago committed by Daniel Kolesa
parent 507061a145
commit f3199ba04b
  1. 10
      src/bindings/cxx/eina_cxx/eina_iterator.hh

@ -189,7 +189,10 @@ public:
void* data;
Eina_Bool r = ::eina_iterator_next(this->_iterator, &data);
if(!r)
this->_iterator = 0;
{
::eina_iterator_free(this->_iterator);
this->_iterator = 0;
}
_value = static_cast<pointer>(data);
return *this;
}
@ -267,7 +270,10 @@ public:
void* data;
Eina_Bool r = ::eina_iterator_next(this->_iterator, &data);
if(!r)
this->_iterator = 0;
{
::eina_iterator_free(this->_iterator);
this->_iterator = 0;
}
_value = static_cast<pointer>(data);
return *this;
}

Loading…
Cancel
Save