[ace-users] how to avoid memory leaks when using proactor?
Steve Huston
shuston at riverace.com
Wed Jun 13 16:42:42 CDT 2007
Hi folks,
> Please see Chapter 9 of C++NPv2
> <www.cs.wustl.edu/~schmidt/ACE/book2/> for information on how to
> cancel I/O operations using the Proactor. Steve, is there similar
> discussion in APG?
Yes, chapter 8. In particular, see section 8.2.2.
> >Version: 5.5.8
> >host: windows xp sp2, suse linux enterprise server 9 sp2
> >compiler: vs.net 2003, gcc 3.3.3
> >
> >When exit from the app, I call end_event_loop of proactor. But the
> >pending write whick holds a message block causes a memory leak.
> >My question is :
> >how to cancel this pending write ? and how to get the
> pending write so
> >I can release its message block ?
You can attempt to cancel the write; some AIO implementations won't
allow it. Even if it is canceled, the cancelation won't be dispatched
if you've already stopped the proactor event loop.
Best regards,
-Steve
--
Steve Huston, Riverace Corporation
Would you like ACE to run great on your platform?
See http://www.riverace.com/sponsor.htm
More information about the Ace-users
mailing list