Destructor of array item not called on OwnedArray::clear()?

has anybody an idea why this might happens?

with this Array i have a strange problem.

OwnedArray<AutomationNode> nodes;

if i iterate through the array and delete the objects individually it works.

for(int i = nodes.size() ; -- i >= 0 ;)
	AutomationNode* node = nodes.getUnchecked(i);

but when i call the clear method it the destructors of the “AutomationNode” objects are not called.


there is nothing special going on with the AutomationNode class, afaict.
i’m a bit puzzled.

thanks :slight_smile:


p.s.: maybe i haven’t just sleept enough :wink:

The clear() method is extremely simple - just step into it and see what happens.

i know, did that already.
just does what it is supposed to do, deleting two items.
but the destructor of the items is not getting invoked.
seems not to be a juce related problem, rather a general problem. maybe the compiler system uses a forward declaration of the AutomationNode class or something for the clear method? would be strange thought, as the manual deletion just works in the same scope.
i was just asking, in case something jumps to ones mind if he hears of this problem.



Sounds like some compiler files have got out of step… Clean rebuild!