std::vector<vector3> spawn_table;
for( int i=0; i<level.getSpawnCount(); ++i )
{
spawn_table.push_back( *( new vector3() ) );
spawn_table.back() = level.getSpawn( i );
}
(Thanks Julien)
Epic failures in the game development field.
This blog covers funny/weird issues and bugs from games that happened during development.
Send your own contributions to igetyourfail at repi.se (can be anonymous if specified)
std::vector<vector3> spawn_table;
for( int i=0; i<level.getSpawnCount(); ++i )
{
spawn_table.push_back( *( new vector3() ) );
spawn_table.back() = level.getSpawn( i );
}
5 comments:
Also quite efficient at leaking memory!
What are you saying? Isn't process memory an infinite resource?!
*Jedi mind trick* The garbage collector will handle that.
@repi: they said a Turing machine has infinite memory!
Oh, I know that, used many times. Memory shredding algorithm. Shreds memory and leaves holes.
Post a Comment