As a beginner I am loving the framework so far and everything has fallen into place - thanks Jules and co.
I am having some trouble with using inheritance and the OwnedArray and know I am missing something simple. I have tried to condense the problem down into its simplest form:
class Base
{
};
class Derived : public Base
{
OwnedArray<Base> list;
};
class Test
{
public:
OwnedArray<Base> stuff;
};
Test t;
t.stuff.add(new Derived());
When I run this it leaks ie.
*** Leaked objects detected: 1 instance(s) of class OwnedArray
If I move 'OwnedArray<Base> list' into Base then no leak occurs.
I am not sure where my mistake is and am a bit stuck as I need inheritance for these classes.
Any help would be gladly appreciated.
