Click here to Skip to main content
15,912,756 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem with adding new record to the datagridview with Master/Child relationship Pin
PIEBALDconsult21-Oct-10 3:06
mvePIEBALDconsult21-Oct-10 3:06 
AnswerRe: Problem with adding new record to the datagridview with Master/Child relationship Pin
Hardz28-Oct-10 23:56
Hardz28-Oct-10 23:56 
QuestionNeed help Pin
rksreadero19-Oct-10 16:33
rksreadero19-Oct-10 16:33 
AnswerRe: Need help Pin
JF201519-Oct-10 18:15
JF201519-Oct-10 18:15 
AnswerRe: Need help Pin
Abhinav S19-Oct-10 23:18
Abhinav S19-Oct-10 23:18 
GeneralRe: Need help Pin
Nish Nishant20-Oct-10 4:04
sitebuilderNish Nishant20-Oct-10 4:04 
GeneralRe: Need help Pin
Keith Barrow20-Oct-10 7:58
professionalKeith Barrow20-Oct-10 7:58 
AnswerRe: Need help Pin
Ravi Bhavnani20-Oct-10 4:53
professionalRavi Bhavnani20-Oct-10 4:53 
Question{"Restore failed for Server '\\\\.\\pipe\\3F103E6E-3FD4-47\\tsql\\query'. "} Pin
Mohammad Dayyan19-Oct-10 15:25
Mohammad Dayyan19-Oct-10 15:25 
QuestionExecuteNonQuery problem? [modified] Pin
Emmet_Brown19-Oct-10 8:21
Emmet_Brown19-Oct-10 8:21 
AnswerRe: ExecuteNonQuery problem? Pin
Luc Pattyn19-Oct-10 8:33
sitebuilderLuc Pattyn19-Oct-10 8:33 
AnswerRe: ExecuteNonQuery problem? Pin
Maciej Los19-Oct-10 8:42
mveMaciej Los19-Oct-10 8:42 
GeneralRe: ExecuteNonQuery problem? Pin
Emmet_Brown19-Oct-10 8:47
Emmet_Brown19-Oct-10 8:47 
AnswerRe: ExecuteNonQuery problem? Pin
Maciej Los19-Oct-10 9:12
mveMaciej Los19-Oct-10 9:12 
AnswerSOLVED Pin
Emmet_Brown19-Oct-10 11:04
Emmet_Brown19-Oct-10 11:04 
AnswerRe: ExecuteNonQuery problem? Pin
Pete O'Hanlon19-Oct-10 22:04
mvePete O'Hanlon19-Oct-10 22:04 
QuestionAxWebBrowser object seems to be causing memory leak Pin
HalliHaida19-Oct-10 1:05
HalliHaida19-Oct-10 1:05 
Hi,

I am using IECore as the renderer. I am able to capture the snapshot of the web content and save it as bmp file (shown below).

To get the content

AxWebBrowser web = new AxWebBrowser();
web.SetBounds(0, 0, 1024, 600);
web.Navigate2(ref URL, ref oNull, ref oNull, ref oNull, ref oNull);
Application.Run();

private Graphics grp;
private IntPtr hdc;
private IViewObject vw;
private IHTMLDocument2 doc;

public void Capture()
{


doc = (IHTMLDocument2)web .Document;
web.SetBounds(0, 0, width, height);

image = new Bitmap(width, height);
grp = Graphics.FromImage(image);

_RECTL bounds;
bounds.left = 0;
bounds.top = 0;
bounds.right = width;
bounds.bottom = height;

hdc = grp.GetHdc();
vw = doc2 as IViewObject;

vw.Draw(1, -1, (IntPtr)0, (IntPtr)0, (IntPtr)0,
(IntPtr)hdc, ref bounds, (IntPtr)0, (IntPtr)0, 0);

grp.ReleaseHdc(hdc);
image.Save(fileName);
image.Dispose();
}

}

I am calling Capture at x fps. What I have observed is, if the application is allowed to run for 30 mins - 1 hrs, the memory increases from 30MB to 600 MB and more and finally the application crashes Frown | :(

I tried forcefully disposing the bitmap and graphics object. But still the problem persists. I am not getting the root cause of the issue.

Any help is appreciated.
AnswerRe: AxWebBrowser object seems to be causing memory leak Pin
Luc Pattyn19-Oct-10 1:39
sitebuilderLuc Pattyn19-Oct-10 1:39 
AnswerRe: AxWebBrowser object seems to be causing memory leak Pin
Pete O'Hanlon19-Oct-10 1:48
mvePete O'Hanlon19-Oct-10 1:48 
GeneralRe: AxWebBrowser object seems to be causing memory leak Pin
HalliHaida25-Oct-10 3:15
HalliHaida25-Oct-10 3:15 
QuestionMessage Removed Pin
18-Oct-10 22:11
Varun Sareen18-Oct-10 22:11 
AnswerRe: KeyValuePair List problem? Pin
OriginalGriff18-Oct-10 22:37
mveOriginalGriff18-Oct-10 22:37 
AnswerRe: KeyValuePair List problem? Pin
johannesnestler19-Oct-10 3:27
johannesnestler19-Oct-10 3:27 
QuestionForm submit to server [modified] Pin
Ajay Kale New18-Oct-10 20:45
Ajay Kale New18-Oct-10 20:45 
AnswerRe: Form submit to server Pin
OriginalGriff18-Oct-10 22:38
mveOriginalGriff18-Oct-10 22:38 

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.