Andreas Zieringer wrote:

> in the scons build system there exist a "invalid_pointer_check" option 
> if you enable this the addRefCP, subRefCP, ... methods are replaced by 
> some special macros and with these it is possible to detect a subRefCP 
> call on a already destroyed pointer. Actually it will report the exact 
> source code line with the invalid subRefCP call as a FATAL error 
> message. As usual there er some drawbacks with this option, ok the check 
> costs a bit processor time, and if you call addRefCP, subRefCP with the 
> OSG namespace like OSG::subRefCP this won't work.
> If someone knows a solution how to write a macro that works with a 
> namespace ...

One solution would be to have the macro throw an exception inside the 
subref-function and have the debugger catch it. At least with VC++, this 
is trivial.

Cheers,
/Marcus


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to