Quote Originally Posted by John E View Post
Good point. I wouldn't have thought of that....

It looks reasonably safe (I think). It just wraps a standard 'C' function (which returns a GdkWindow*). That's then used to create a Glib::RefPtr which gets returned to the caller.
You can create a duplication function, stick the const keyword at the end of it, call it in your main function, and compile.

If the compiler doesn't like it, you'll know what in there can be potentially dangerous.

Regards,

Paul McKenzie