[USRP-users] Boost Question / Windows

Josh Blum josh at ettus.com
Mon Jun 4 12:37:53 EDT 2012



On 06/04/2012 03:16 AM, Simon HB9DRV wrote:
> Hi,
> 
>  
> 
> I'm dynamically loading the UHD.dll (latest unstable) and need to know how
> to release resources so that the DLL will exit cleanly.
> 
>  

You can cause the object to deconstruct by letting all smart pointers go
out of scope or reseting the smart pointers with .reset()

-josh

> 
> How do I (should I) delete my instance of usrp created with
> uhd::usrp::multi_usrp::make ?
> 
> How do I (should I) delete my instance of rx_streamer created with
> usrp->get_rx_stream ?
> 
>  
> 
> Apart from this problem I'm a happy bunny J !
> 
>  
> 
> The DLL hangs as below:
> 
>  
> 
>                SDRSourceEttus.dll!boost::detail::sp_counted_base::release()
> Line 103      C++
> 
>  
> SDRSourceEttus.dll!boost::detail::shared_count::~shared_count()  Line 309
> C++
> 
>  
> SDRSourceEttus.dll!boost::shared_ptr<uhd::usrp::multi_usrp>::~shared_ptr<uhd
> ::usrp::multi_usrp>()  + 0x2f bytes        C++
> 
>               SDRSourceEttus.dll!CSDRSourceEttusApp::~CSDRSourceEttusApp()
> + 0x4e bytes     C++
> 
>               SDRSourceEttus.dll!`dynamic atexit destructor for 'theApp''()
> + 0x21 bytes               C++
> 
>               SDRSourceEttus.dll!_CRT_INIT(void * hDllHandle, unsigned long
> dwReason, void * lpreserved)  Line 415               C
> 
>               SDRSourceEttus.dll!__DllMainCRTStartup(void * hDllHandle,
> unsigned long dwReason, void * lpreserved)  Line 526 + 0x13 bytes
> C
> 
>               SDRSourceEttus.dll!_DllMainCRTStartup(void * hDllHandle,
> unsigned long dwReason, void * lpreserved)  Line 477        C
> 
>               ntdll.dll!LdrpUnloadDll()  - 0x13ee bytes   
> 
>  
> 
> Simon Brown, HB9DRV
> http://dit-dit-dit.com
> 
>  
> 
> Not sent from an iPhone: I don't have one and I don't want one.
> 
>  
> 
> 
> 
> 
> 
> _______________________________________________
> USRP-users mailing list
> USRP-users at lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com




More information about the USRP-users mailing list