In reply to dave_59:
In reply to hsam:
I don’t understand where you think you are accessing null handles. You are copying class handles onto the queue, not class objects.
q.push_back(w) is equivalent to the example below in the way the handles are passed w.r.t my original code?
class a=new();
class b;
b = a;//copy b handle to a so now both b, a point to the same object