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
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2006 orx
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.
10
11   ### File Specific:
12   main-programmer: Benjamin Grauer
13   co-programmer: ...
14*/
15
16//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
17
18#include "new_class_id.h"
19#include <cassert>
20
21///////////////////////////////////////////////////////////
22//// CLASS ID definiton. //////////////////////////////////
23///////////////////////////////////////////////////////////
24/**
25 * @brief standard constructor
26 */
27NewClassID::NewClassID ()
28{}
29
30
31/**
32 * @brief standard deconstructor
33 */
34NewClassID::~NewClassID ()
35{
36  //  assert(_objectList != NULL);
37  ClassList::iterator it;
38  for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
39  {
40    (*it)._objectList->unregisterObject((*it)._iterator);
41    delete (*it)._iterator;
42  }
43  //_objectList->unregisterObject(this->_iterators);
44}
45
46
Note: See TracBrowser for help on using the repository browser.