one single object, but an array of objects ?
> >>Call each objects destructor and then a dealloc for the whole array ?[/color] > > > > That’s right.[/color] > > But this is a hassle for me, since I then have to rember the size of > each array (the number of elements in there) or otherwise i would not be > able to delete it correctly. > > My problem is, i’m doing billions (!) of new and delete (and copy ctors) > on small int arrays, which results in quie slow code.[/color] No, it won’t be slow – at least not for the reasons mentioned – because deleting an int is a no-op. You don’t even have to write the explicit dtor call, though. int, like all C types is called a ‘POD’ in C++. That means Plain Old Data. For C compatibility, you can still treat those types like in C.