16.08.2010, 18:20
If "objects" is a vector, try the following
where n is the maximum number of objects you're gonna create. This will allocate enough space for n elements inside the vector and it won't grow and re-allocate memory while you're adding the objects (should also increase performance btw). If it still fails, you may also try using a static array instead of container.
Код:
// call when plugin gets loaded objects.reserve(n);