Is it bad/illegal C++ to delete manually objects from a stack or there are situation when it is acceptable?
Edit
Constructor(pointer parent, pointer left, pointer right):parent_(parent),left_(left), right_(right)
{ }
~Constructor()
{
delete parent_;
delete left_;
delete right_;
}
main()
{
Object parent;
Object left;
Object right;
Constructor c(&parent,&left,&right);
}
Is there any way to check if object is on heap or on stack?