Fixed a memory leak in the auto4 ScriptFactory

Originally committed to SVN as r3044.
This commit is contained in:
harukalover 2009-06-11 02:17:42 +00:00
parent 905b41dd5a
commit de26551082

View file

@ -736,6 +736,7 @@ namespace Automation4 {
for (std::vector<ScriptFactory*>::iterator i = factories->begin(); i != factories->end(); ++i) {
if (*i == factory) {
factories->erase(i);
if (factories->empty()) delete factories;
return;
}
}