Click here to Skip to main content
16,013,207 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralPROGRAM ICONS (portability and configurability) Pin
Anonymous27-Dec-02 6:01
Anonymous27-Dec-02 6:01 
Generalmessage map question Pin
ns27-Dec-02 5:22
ns27-Dec-02 5:22 
GeneralRe: message map question Pin
valikac27-Dec-02 6:07
valikac27-Dec-02 6:07 
GeneralRe: message map question Pin
ns27-Dec-02 6:09
ns27-Dec-02 6:09 
Generalvideo capture.... Pin
joshfl27-Dec-02 3:51
joshfl27-Dec-02 3:51 
GeneralMemory Leak with MSXML3 Pin
tmasm27-Dec-02 3:19
tmasm27-Dec-02 3:19 
GeneralReal code? Pin
27-Dec-02 3:56
suss27-Dec-02 3:56 
GeneralRe: Real code? Pin
tmasm27-Dec-02 4:31
tmasm27-Dec-02 4:31 
1. the main code is:

STDMETHODIMP Cdemo::myDemo(BSTR docIn, BSTR *docOut)
{
HRESULT hr;
CComPtr<msxml2::ixmldomdocument> pDOMObject=NULL;
CComPtr<msxml2::ixmldomdocument> myDocTemp=NULL;

CComBSTR mOut=NULL;



hr= CoCreateInstance(CLSID_DOMDocument, NULL,CLSCTX_SERVER,
IID_IXMLDOMDocument2, (LPVOID*)(&pDOMObject));
hr=pDOMObject->loadXML(docIn);
try
{

hr=MyPrivateFunc(pDOMObject,&myDocTemp);

if FAILED(hr)
throw hr;

if (myDocTemp)
hr=myDocTemp->get_xml(&mOut);
else
mOut=L"Error";


*docOut=mOut.Detach();

}
catch (...) {

mOut=CComBSTR(L"Error").Detach();
}
return S_OK;
}



HRESULT Cdemo::MyPrivateFunc(MSXML2::IXMLDOMDocument *xmlin,MSXML2::IXMLDOMDocument **xmlout) {

IXMLDOMDocumentPtr myDoc;
CComPtr<msxml2::ixmldomdocument> myDocIn(xmlin);
CComBSTR mtemp;

if (myDocIn)
myDocIn->get_xml(&mtemp);

HRESULT hr=CoCreateInstance(CLSID_FreeThreadedDOMDocument30, NULL,
CLSCTX_INPROC_SERVER, IID_IXMLDOMDocument2,
(void **)&myDoc);

if FAILED(hr)
return S_FALSE;

CComBSTR bstrDummy("<demo>");
bstrDummy.Append(mtemp);
bstrDummy.Append("");
myDoc->loadXML(bstrDummy);
*xmlout=myDoc.Detach();
return S_OK;
}
2.
I'm using Stress Tool to instance the object, using a ASP page. after running the stress with 40Threads and for 5/10 minutes the memory doesn´t stop growing...(very small chunks). Its there anything I should know about you said for "funny memory management"...
thanks again.
GeneralRe: Real code? Pin
AlexO27-Dec-02 4:53
AlexO27-Dec-02 4:53 
GeneralRe: Real code? Pin
tmasm27-Dec-02 5:02
tmasm27-Dec-02 5:02 
GeneralRe: Memory Leak with MSXML3 Pin
Navin27-Dec-02 7:01
Navin27-Dec-02 7:01 
GeneralCustomization of Build Pin
gracias_carol27-Dec-02 1:58
gracias_carol27-Dec-02 1:58 
GeneralWhat kind of customization? Pin
AlexO27-Dec-02 4:04
AlexO27-Dec-02 4:04 
GeneralRe: What kind of customization? Pin
gracias_carol29-Dec-02 23:07
gracias_carol29-Dec-02 23:07 
Generalifstream and skipws Pin
georgiek5027-Dec-02 1:15
georgiek5027-Dec-02 1:15 
GeneralRe: ifstream and skipws Pin
Taka Muraoka27-Dec-02 1:24
Taka Muraoka27-Dec-02 1:24 
GeneralHelp me to Release Resources! Pin
HellShrimp4free27-Dec-02 0:23
HellShrimp4free27-Dec-02 0:23 
GeneralRe: Help me to Release Resources! Pin
Mike Nordell27-Dec-02 1:05
Mike Nordell27-Dec-02 1:05 
GeneralGlobals and condition compilation Pin
georgiek5026-Dec-02 22:39
georgiek5026-Dec-02 22:39 
GeneralRe: Globals and condition compilation Pin
Roger Allen27-Dec-02 0:05
Roger Allen27-Dec-02 0:05 
GeneralRe: Globals and condition compilation Pin
georgiek5027-Dec-02 1:14
georgiek5027-Dec-02 1:14 
GeneralMemory Address Interpretation Pin
Dominik Reichl26-Dec-02 22:20
Dominik Reichl26-Dec-02 22:20 
GeneralRe: Memory Address Interpretation Pin
Joaquín M López Muñoz26-Dec-02 22:34
Joaquín M López Muñoz26-Dec-02 22:34 
GeneralRe: Memory Address Interpretation Pin
Dominik Reichl27-Dec-02 0:29
Dominik Reichl27-Dec-02 0:29 
GeneralRe: Memory Address Interpretation Pin
Mike Nordell27-Dec-02 1:12
Mike Nordell27-Dec-02 1:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.