From: dpb on
Paolo wrote:
> Hi Jan,
>
> debugging the code this is the exception I got:
>
> "Unhandled exception at 0x04ce3620 (qlDiscountFactors.mexw32) in
> MATLAB.exe: 0xC0000005: Access violation writing location 0xffff5df8."
>
> and the line is this
>
> void release() // nothrow
> {
> -----------> if( BOOST_INTERLOCKED_DECREMENT( &use_count_ ) == 0 )
....

so, what are BOOST_INTERLOCKED_DECREMENT and use_count_?

Assuming the debugger is able to catch the exception at the point it is
actually thrown, it would appear there's a problem here.

--