I\'m having problem with dynamic_cast. i just compiled my project and tested every thing in debug mode and then i tried compiling it in release mode, i have copied every configu
Does CCNode
have any virtual functions? Are all elements of temp->getChildren()->begin() really CCNode
s? Does temp->getChildren()
return a reference? The latter is especially insidious: you call both temp->getChildren()->begin()
and temp->getChildren()->end()
. If getChildren()
returns a copy, you're taking the begin
of one copy and the end
of another copy.
In this case after many code changes I found out there has to be some bugs which show themselves when code is optimized (still don't know if it's compiler's mis optimization or my code has some problems but it's probably mine). and the main reason for that problem was with *l
being NULL.