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 );
}