IHTMLDocument interface leaks caused by system not "friendly" to exit

zhaozj2021-02-16  78

HR = pwebbrowser-> get_document (& phtmldoc);

Forget Release PHTMLDOC

Actually cause theloop.run (); directly withdrawn, leading to the release of resources

INT Run (LPTSTR / * LPSTRCMDLINE * / = null, int ncmdshow = sw_showdefault) {cmessageloop theloop; _Module.addMessageloop (& theloop);

CMSGLOOP CMSGLOOP;

INT nret = theloop.run ();

_Module.RemoveMessageloop ();

Return nret;

转载请注明原文地址:https://www.9cbs.com/read-12766.html

New Post(0)