Well, I've commited this leaving freeStaticCodecs() inside of the sLock lock. But I'm still very much interested how this may happen, that spInstance is NULL when freeSingletonHandle() is called.
On Thu, Dec 11, 2008 at 4:05 PM, Alexander Chemeris <[email protected]> wrote: > On Thu, Dec 11, 2008 at 8:10 AM, Paul Whitfield <[email protected]> > wrote: >> Index: src/mp/MpCodecFactory.cpp >> =================================================================== >> --- src/mp/MpCodecFactory.cpp (revision 11075) >> +++ src/mp/MpCodecFactory.cpp (working copy) >> @@ -94,12 +94,16 @@ >> void MpCodecFactory::freeSingletonHandle() >> { >> sLock.acquire(); >> - freeStaticCodecs(); >> if (spInstance != NULL) >> { >> delete spInstance; >> spInstance = NULL; >> + >> + sLock.release(); >> + >> + freeStaticCodecs(); >> } >> + else >> sLock.release(); >> } >> > > How spInstance can be NULL? Is freeSingletonHandle() > called twice somewhere, or is it called after non successful > MpCodeFactory creation? > > > -- > Regards, > Alexander Chemeris. > > SIPez LLC. > SIP VoIP, IM and Presence Consulting > http://www.SIPez.com > tel: +1 (617) 273-4000 > -- Regards, Alexander Chemeris. SIPez LLC. SIP VoIP, IM and Presence Consulting http://www.SIPez.com tel: +1 (617) 273-4000 _______________________________________________ sipxtapi-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
