Crash while push back objects
#3

If "objects" is a vector, try the following

Код:
// call when plugin gets loaded
objects.reserve(n);
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.
Reply


Messages In This Thread
Crash while push back objects - by RyDeR` - 16.08.2010, 17:47
Re: Crash while push back objects - by pliva_sb - 16.08.2010, 18:04
Re: Crash while push back objects - by Zeex - 16.08.2010, 18:20
Re: Crash while push back objects - by pliva_sb - 16.08.2010, 18:22
Re: Crash while push back objects - by RyDeR` - 16.08.2010, 20:33
Re: Crash while push back objects - by RoBo - 16.08.2010, 21:44

Forum Jump:


Users browsing this thread: 1 Guest(s)