mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 22:02:49 -06:00
24 lines
404 B
C++
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;
|
|
}
|