149	+                        mPackages.erase(it++);

The pointer to the AiPackage is erased from the list, but it is never deleted.