Hi,
When using vector to create array of object, the destructor gets called right after the constructor, but when i use new it works OK.
std::vector<MyClass> myobj(numofobjects, MyClass());
Code:class MyClass {
Myclass()
{
}
virtual ~Myclass()
{
}