Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] io_service use in dll leads to service_registry crash
From: joshr (joshrehm_at_[hidden])
Date: 2009-02-18 13:54:59


Igor R wrote:
>
> I built and run your code. It really crashes if you forcibly unload the
> dll
> but it does *not* crash if I comment-out this line *or* if I remove
> acceptor
> object from the dll code. It seems that the reason of the crash is that a
> dll statically linked to CRT has its own private CRT (including memmoty
> management), so when you free the dll, all the asio objects created from
> within the dll (asio services in this case) become inaccessible.
> Try and build asio, dll and the host app with dynamic CRT - probably this
> will help.
>

This was the same behavior I saw as well after further testing and came to
the same conclusions. Ultimately I want to hide the Boost interface from
plugin developers so that I don't require the use of Boost. For this
initial implementation, which I have to write, I was hoping to pass the
boost objects as a temporary stepping stone.

At any rate, thank you very much for your feedback! It definitely gives me
some things to rethink in my design.

-- 
View this message in context: http://www.nabble.com/-asio--io_service-use-in-dll-leads-to-service_registry-crash-tp22052497p22085688.html
Sent from the Boost - Users mailing list archive at Nabble.com.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net