473,466 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem with LoadFromResource...please help

Joe
Dear All,

I have a piece of code that loads an html page (using LoadFromResource) on
to the dialog as a GUI. Every time after the user does something then a
different html page will be loaded.

After I ran my code for a few thousand transactions then I see a big
increase in the memory size of my application.

I used Rational Purify and it said that mshtml.dll is leaking memory.

MLK: Memory leak of 10240 bytes from 5 blocks allocated in mshtml.dll

Distribution of leaked blocks

10240 bytes from 5 blocks of 2048 bytes (first block:
0x09f493d8)

Allocation location

[KERNEL32.dll ip=0x6C8033C8]

[mshtml.dll ip=0x7CCD284A]

[mshtml.dll ip=0x7CD3FABC]

[mshtml.dll ip=0x7CD3FA85]

[mshtml.dll ip=0x7CD3FBE8]

[mshtml.dll ip=0x7CD3FBAA]

[mshtml.dll ip=0x7CD3FAE2]

[mshtml.dll ip=0x7CCF110F]

[mshtml.dll ip=0x7CCF0FF2]

[mshtml.dll ip=0x7CCF0F72]

Also I loop test the code that responsible for loading the html and I found
from the Window Task Manager that each time the memory increases more first
and later it decreases but not to the initial level.

Ex : Memory before the code ˇV 100 K

After the Call ˇV 300K

And Later it comes down to 200K.

Here is a sample of the loop test I did. Is there any function I can call to
make sure that resource loaded are released properly? Or could the memory
increase due to another factor? I am using VC++ .NET and Window XP
Professional ver.2002 SP1 and mshtml.dll (ver. 6.0.2800.1106).

CENTRANCEDlg ent_dialog;

..

..

..

class CENTRANCEDlg : public CDHtmlDialog

..

..

..

//helper function inside the CENTRANCEDlg class

BOOL CENTRANCEDlg::LoadFromResource2( int id )

{

try

{

BOOL result = LoadFromResource(id);

Sleep(300);

}

catch (...)

{

}

return S_OK;

}

// loop testing the function

for(int i=0; i<10000; i++)

{

ent_dialog.LoadFromResource2(IDR_HTML_PF_ENTER);

}



Thank you very much.

Joe
Nov 17 '05 #1
0 1082

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: newbie_mw | last post by:
Hi, I need urgent help with a novice problem. I would appreciate any advice, suggestions... Thanks a lot in advance! Here it is: I created a sign-up sheet (reg.html) where people fill in their...
11
by: Kostatus | last post by:
I have a virtual function in a base class, which is then overwritten by a function of the same name in a publically derived class. When I call the function using a pointer to the derived class...
3
by: Spacy | last post by:
Am creating a HTML Report in asp.net. To save this report to excel on client-side, i write this code: Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("content-disposition",...
0
by: Kurt Watson | last post by:
I’m having a different kind of problem with Hotmail when I sign in it says, "Web Browser Software Limitations Your Current Software Will Limit Your Ability to Use Hotmail You are using a web...
28
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
9
by: Rajat Tandon | last post by:
Hello there, I am relatively new to the newsgroups and C#. I have never been disappointed with the groups and always got the prompt replies to my queries.This is yet another strange issue, I am...
11
by: ASP newbie | last post by:
I cannot run my asp.net application in w2k server. But the program works fine under w2k professional. Can anyone tell me is there any difference in the settings? Many thanks.
1
by: funfair | last post by:
HI,EVERY ONE first problem, i have create a database in access 2003 it worked fine untill i have format my laptop . now im working on office 2003 on windows xp and i have norton 2006 but im...
2
by: cty0000 | last post by:
Please anybody help me... I have some serious problem.. I'm doing to keep equpiment list(string).. In my code, there are 3 page which are having 4 equpiment ID (user control.) like this...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.