Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/lang/new_class_id.cc @ 9676

Last change on this file since 9676 was 9674, checked in by bensch, 18 years ago

orxonox/trunk: here is the speedup test… more or less:
20 iterations of generating and deleting 10000 objects

old version:
real 0m7.485s
user 0m7.344s
sys 0m0.012s

new version:
real 0m0.627s
user 0m0.568s
sys 0m0.032s

for that it is way more dynamic, the speedup was worth it :)

File size: 1.1 KB
RevLine 
[4744]1/*
[1853]2   orxonox - the future of 3D-vertical-scrollers
3
[9659]4   Copyright (C) 2006 orx
[1853]5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
[1855]10
11   ### File Specific:
[9659]12   main-programmer: Benjamin Grauer
[1855]13   co-programmer: ...
[1853]14*/
15
[3955]16//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
[1853]17
[9659]18#include "new_class_id.h"
19#include <cassert>
[1853]20
[9659]21///////////////////////////////////////////////////////////
22//// CLASS ID definiton. //////////////////////////////////
23///////////////////////////////////////////////////////////
[3245]24/**
[9659]25 * @brief standard constructor
26 */
27NewClassID::NewClassID ()
[9660]28{}
[1853]29
30
[3245]31/**
[9659]32 * @brief standard deconstructor
33 */
34NewClassID::~NewClassID ()
[3543]35{
[9672]36  //  assert(_objectList != NULL);
[9673]37  ClassList::iterator it;
[9672]38  for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
[9674]39  {
[9672]40    (*it)._objectList->unregisterObject((*it)._iterator);
[9674]41    delete (*it)._iterator;
42  }
[9672]43  //_objectList->unregisterObject(this->_iterators);
[3543]44}
[9659]45
46
Note: See TracBrowser for help on using the repository browser.