Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: EndDialog() for modal Pin
ns20-Mar-03 9:34
ns20-Mar-03 9:34 
GeneralRe: EndDialog() for modal Pin
Neville Franks20-Mar-03 9:37
Neville Franks20-Mar-03 9:37 
Generalsorry for the confusion Pin
ns20-Mar-03 9:42
ns20-Mar-03 9:42 
QuestionHow to avoid this? (HTMLView and Handle leaks) Pin
Joan M20-Mar-03 7:43
professionalJoan M20-Mar-03 7:43 
AnswerRe: How to avoid this? (HTMLView and Handle leaks) Pin
Stephane Rodriguez.20-Mar-03 8:19
Stephane Rodriguez.20-Mar-03 8:19 
GeneralRe: How to avoid this? (HTMLView and Handle leaks) Pin
Joan M20-Mar-03 8:44
professionalJoan M20-Mar-03 8:44 
GeneralRe: How to avoid this? (HTMLView and Handle leaks) Pin
Stephane Rodriguez.20-Mar-03 9:19
Stephane Rodriguez.20-Mar-03 9:19 
GeneralRe: How to avoid this? (HTMLView and Handle leaks) Pin
Joan M20-Mar-03 20:35
professionalJoan M20-Mar-03 20:35 
Well, thank you, I've done it and it continue working, but it continue leaking some handles...

I have more information to give to you:

The third code portion (step 3.) doesn't seems to be the guilty: that HTMLView modify it's contents each time the user selects items in a listView.

The HTML is used in order to show information regarding to items of a ListView, so each time that the user changes the selection the HTML gets changed...

The fact is that when the user changes the HTML View via selecting another field, nothing happens (I don't leak any handle).

but the first time the leaking occurs...

It seems that I create the new page via "Navigate2(_T("about:blank"));" and that when after I try to modify it I don't do it allright, because then and only then is when the leaks happen:
PROGRAM FLOW WHEN LEAKING HAPPEN:
1. this->Navigate2(_T("about:blank"), navNoHistory); <code>This line ONLY happens at the intitialization of the view...</code>
2. Selecting programatically the first item in the listview.
3. OnItemchanged calls PrepareHTML(); (Only one time (I'm sure about it))
4. PrepareHTML(); contains the <code>step 3</code> (the one you've helped me to modify...)
5. Closing window.
PROGRAM FLOW WHEN LEAKING HAPPEN 2:
1. this->Navigate2(_T("about:blank"), navNoHistory); <code>This line ONLY happens at the intitialization of the view...</code>
2. Selecting programatically the first item in the listview.
3. OnItemchanged calls PrepareHTML(); (Only one time (I'm sure about it))
4. PrepareHTML(); contains the <code>step 3</code> (the one you've helped me to modify...)
5. the user selects n times other items in the listview. <code>see notes below "note 1"</code>
6. Closing window.
NOTES:
note 1:
It's curious to see that the same handles are leaked if the user selects 2000 different items in the listview or if the user doesn't select any other item than the first one that is selected.

note 2:
If I comment the line that writes the safearray inside the HTML (inside the step 3)(hr = pHTMLDoc2->write(pSafeArray);) then no leaks happen.

note 3:
notes 1 and 2 make me think that I have misunderstood something in the middle of the steps 1 and 3 because the leaking only happen between those steps...
I've noticed that leakage only happens when I create the HTML page using Navigate2 and when after I Write a safearray inside the HTML page... leakage doesn't happen if, after the first time I select n items in the listview, in this case the HTML modification happens without any error...


As always thank you in advance.
GeneralRe: How to avoid this? (HTMLView and Handle leaks) Pin
Stephane Rodriguez.20-Mar-03 21:17
Stephane Rodriguez.20-Mar-03 21:17 
GeneralRe: How to avoid this? (HTMLView and Handle leaks) Pin
Joan M20-Mar-03 22:09
professionalJoan M20-Mar-03 22:09 
GeneralRe: How to avoid this? (HTMLView and Handle leaks) Pin
Stephane Rodriguez.20-Mar-03 22:31
Stephane Rodriguez.20-Mar-03 22:31 
GeneralRe: How to avoid this? (HTMLView and Handle leaks) Pin
Joan M20-Mar-03 22:53
professionalJoan M20-Mar-03 22:53 
GeneralRe: How to avoid this? (HTMLView and Handle leaks) Pin
Joan M20-Mar-03 22:59
professionalJoan M20-Mar-03 22:59 
GeneralRe: How to avoid this? (HTMLView and Handle leaks) Pin
Joan M21-Mar-03 4:05
professionalJoan M21-Mar-03 4:05 
AnswerRe: How to avoid this? (HTMLView and Handle leaks) Pin
Neville Franks20-Mar-03 9:34
Neville Franks20-Mar-03 9:34 
GeneralRe: How to avoid this? (HTMLView and Handle leaks) Pin
Joan M20-Mar-03 19:45
professionalJoan M20-Mar-03 19:45 
GeneralRe: How to avoid this? (HTMLView and Handle leaks) Pin
Neville Franks21-Mar-03 0:29
Neville Franks21-Mar-03 0:29 
GeneralRe: How to avoid this? (HTMLView and Handle leaks) Pin
Joan M21-Mar-03 1:15
professionalJoan M21-Mar-03 1:15 
GeneralRe: How to avoid this? (HTMLView and Handle leaks) Pin
Joan M21-Mar-03 3:56
professionalJoan M21-Mar-03 3:56 
GeneralWenn printing the fill function doesn't work Pin
willempipi20-Mar-03 7:40
willempipi20-Mar-03 7:40 
GeneralRe: Wenn printing the fill function doesn't work Pin
Chris Losinger20-Mar-03 8:03
professionalChris Losinger20-Mar-03 8:03 
GeneralRe: Wenn printing the fill function doesn't work Pin
willempipi20-Mar-03 8:33
willempipi20-Mar-03 8:33 
Generalserialize Pin
dudic20-Mar-03 7:13
dudic20-Mar-03 7:13 
GeneralRe: serialize Pin
Anonymous20-Mar-03 8:20
Anonymous20-Mar-03 8:20 
GeneralRe: serialize Pin
dudic20-Mar-03 8:25
dudic20-Mar-03 8:25 

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.