exactly what code do you want to see?
i sort of feel that this is a "philosophical" issue and
not a "coding" mistake
in another reply, i pointed out that OUR works.
based on my limited understanding of OUR;
it seems that OUR prevents PERL from deleting the C++ Object when its being passed around.
but the OUR declaration has to be global
Comment on Re^3: C++ object & PERL garbage collection