[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] evthread_use_windows_threads() cause memory leak?



i use libevent-2.0.20-stable in my MFC project

here is code:

BOOL CDemoApp::InitInstance()
{
    WSADATA wsadata;
    if (WSAStartup( MAKEWORD( 2, 2 ), &wsadata ) )
        return false;

    //there is no memory leak after delete evthread_use_windows_threads().
    evthread_use_windows_threads();
    event_base* base=event_base_new();
    event_base_priority_init( base, 2 );

    evthread_make_base_notifiable( base );

    //my other code without use libevent api.

    event_base_free( base );
}

my mistake or the libevent bug?