|
Boost : |
Subject: Re: [boost] [threads] Win32 Events on POSIX
From: Rob Stewart (rob.stewart_at_[hidden])
Date: 2015-02-17 05:02:06
On February 17, 2015 3:52:18 AM EST, Fu ji <fujimailing_at_[hidden]> wrote:
>
> i ported: https://github.com/neosmart/pevents
> and it already works well but when we go out of scope I have probably
> some
> heap corruption. (HEAP[app.exe]: HEAP: Free Heap block 363ef10
> modified at
> 363ef38 after it was freed). I attached source code and also test
> case,
> maybe I am blind because I don't know what is wrong.
Please don't top post or over-quote on this list. Read the policies at http://www.boost.org/community/policy.html#quoting
If your code used C++ rather than C, the problem would be easier to resolve. Constructors, destructors, and other member functions would ensure proper lifetime management, encapsulate a lot of logic, and declutter the API functions.
One thing I did notice: your wait loops can easily exceed the supplied timeouts.
___
Rob
(Sent from my portable computation engine)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk