Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can always make sure there exists another NodeHandle outside of your class, e.g. in the main function, which is initialized before you create the object and lives as long as you want the node to live. However, as @Wolf points out, I see no benefit in not rather storing a node handle as a (private) member of your class and avoid potential bugs of your class depending on the existance of an external node handle.