ultimatepp/uppdev/vdest/vdest.cpp
cxl 351994a6cc Adding uppdev....
git-svn-id: svn://ultimatepp.org/upp/trunk@328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2008-08-15 08:36:24 +00:00

24 lines
404 B
C++

#include <Core/Core.h>
using namespace Upp;
struct Item : public Moveable<Item> {
String name;
~Item() { LOG("~Item"); }
};
struct Collection : public Item
{
Vector<Item> items; // Heap leak if changed to Array
~Collection() { LOG("~Collection"); }
};
CONSOLE_APP_MAIN
{
Collection *col = new Collection();
col->items.Add();
Item *item = (Item *)col;
delete item;
}