in trunk/Lib/php/director.swg there is:
~Director() {
for (swig_ownership_map::iterator i = swig_owner.begin(); i != swig_owner.end(); i++) {
swig_owner.erase(i);
}
}
The i++ after the erase is invalid use of an std::map iterator. The erase invalidates the iterator.
It seems that this code should be written without the loop as:
~Director() {
swig_owner.clear();
}
I have attached a patch.
Thanks
-Cory
patch for trunk/Lib/php/director.swg @ r12441
Unless I'm missing something, we don't actually need an explicit destructor here at all! The swig_owner member will be destoyed when the object is, and that will call any destructors on objects in the map.
Testing that change now...
That works, so applied in r12469.