how to get log in ISA server 2006 C++ SDK without memory leak -
how to get log in ISA server 2006 C++ SDK without memory leak -
i wrote method session log info isa server 2006 sdk
the main code below , have utilize code in do-while() sessions info line create leak memory .
at end released pointer of fpclib::ifpclogentryptr mem leak still exist . :( please help me problem .
fpclib::ifpclogentryptr = fpclib::ifpclogcontentptr::item(index) . . // reading informationsuch ip, url , byte send , .... . fpclib::ifpclogentryptr.release(); hr = logfilter.createinstance("fpc.fpcfilterexpressions"); hr = logfilter->put_filtertype(fpclib::fpcfiltertype::fpcnofiltertype); fpclogviewer = fpcarray->logviewer; logcontent = fpclogviewer->getlogcontentonline(); logcontent->executequery(logfilter,executerowcount); fpclib::ifpclogentryptr fpclogentry; _bstr_t clientip; int index= 0; { index ++ ; fpclogentry = logcontent->item(_variant_t(index)); clientip = fpclogentry->clientip; fpclogentry.release(); } while (1)
the point line logcontent->executequery(logfilter,executerowcount);
the fist step alter while for
second- executerowcoun must not larg number such 1000000000
after 'for' have utilize logcontent->endquery()
if need still logging start function again
c++
Comments
Post a Comment