Also the memory allocation triggering the limit was never freed. And if the exception was thrown in a constructor using placement new, the pre-allocated memory was not freed either.
This folder contains a modified version of Squirrel that is tailored to meet the needs of OpenTTD. We have based this modification on the version as described in: include/squirrel.h