Yes, ref. counting would probably be the best way to avoid an exit handler here. I think this could be done with an atomic inc. in ca_context_create() and dec. in ca_context_destroy().
And then I notice that caClientContextIdOnce in access.cpp is already being leaked... So maybe just remove "cacExitHandler()"? This would be far from the only one-time leak in Base.
Yes, ref. counting would probably be the best way to avoid an exit handler here. I think this could be done with an atomic inc. in ca_context_create() and dec. in ca_context_ destroy( ).
And then I notice that caClientContext IdOnce in access.cpp is already being leaked... So maybe just remove "cacExitHandler()"? This would be far from the only one-time leak in Base.