Closed GoogleCodeExporter closed 8 years ago
I've encounter this problem just now. I tried to fix it by changing code in
RemoveMember() to
Member* last = data_.o.members + (data_.o.size - 1);
if (last == m) {
m->name.~GenericValue();
m->value.~GenericValue();
} else {
m->name = last->name;
m->value = last->value;
}
that is, it now checks if we are removing last member and if yes, it just calls
destructors instead of assignment operator. I'm not sure if this is correct
fix, but so far it stopped crashing on the assertion. I have yet to run
valgrind on it to check if this causes memory leaks.
Original comment by alex.bol...@gmail.com
on 31 Jul 2012 at 9:44
Original comment by milo...@gmail.com
on 12 Nov 2012 at 2:25
Original issue reported on code.google.com by
toxyg...@gmail.com
on 31 Jul 2012 at 12:22