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

C / C++ / MFC

 
AnswerRe: Bitmap histogram - size does matter ! Pin
Mark Salsbery17-Jun-08 13:42
Mark Salsbery17-Jun-08 13:42 
GeneralRe: Bitmap histogram - size does matter ! Pin
Vaclav_17-Jun-08 15:05
Vaclav_17-Jun-08 15:05 
GeneralRe: Bitmap histogram - size does matter ! Pin
Mark Salsbery18-Jun-08 6:03
Mark Salsbery18-Jun-08 6:03 
GeneralRe: Bitmap histogram - size does matter ! Pin
Vaclav_18-Jun-08 7:04
Vaclav_18-Jun-08 7:04 
GeneralRe: Bitmap histogram - size does matter ! Pin
Mark Salsbery18-Jun-08 10:58
Mark Salsbery18-Jun-08 10:58 
QuestionMFC CListCtrl Memory management Pin
Psyinx17-Jun-08 9:52
Psyinx17-Jun-08 9:52 
QuestionRe: MFC CListCtrl Memory management Pin
David Crow17-Jun-08 10:05
David Crow17-Jun-08 10:05 
AnswerRe: MFC CListCtrl Memory management Pin
Psyinx17-Jun-08 11:42
Psyinx17-Jun-08 11:42 
DavidCrow wrote:
How are you verifying this?


Simple: The application that is using the list revolves around an extreme amount of incoming data. After the usual steps of creating the structure that will be used inside the list, instead of adding it to the list, i delete it, using the same deletion code i use upon clearing the list.
Watching the applications memory usage with the list added data, the memory can grow from 30mb to 150 within a matter of 5 minutes.
Without adding the data to the list, the application remains constant at 30mb.

I've made 100% sure that after adding the classes to the list that my garbage collection is done once the list is cleared
(for every constructor called i increment a counter, for every destructor called i decrement the counter, and lo and behold, it
shoots to 2000 at max (my ceiling for the list), then back down to 0 once their destructors are called.)

I know for a fact that the destructor code is cleaning up the object as without the list, the memory is constant.

DavidCrow wrote:
How would the list control know that you've deleted the memory pointed to by the call to GetItemData()?


This is a good question.. However once the object has been deleted, it should automatically reclaim the memory from that object that has been deleted.. or at least this is what should happen in theory (and does happen without the call to SetItemData), also what confuses me is that i'm handing the SetItemData a pointer, and not the actual "data", and the last time i checked, 2000 pointers do not add up to 120mb..

I'm definitely missing something here! Am i assigning the data incorrectly? Deleting the data incorrectly? Clearing the list incorrectly? I'm really stumped!
Is there a message that i can send the list to inform the list that the data has been deleted?

Thanks.
QuestionRe: MFC CListCtrl Memory management Pin
David Crow17-Jun-08 16:37
David Crow17-Jun-08 16:37 
AnswerRe: MFC CListCtrl Memory management Pin
bonkers12318-Jun-08 1:02
bonkers12318-Jun-08 1:02 
QuestionRe: MFC CListCtrl Memory management Pin
David Crow18-Jun-08 2:26
David Crow18-Jun-08 2:26 
AnswerRe: MFC CListCtrl Memory management Pin
bonkers12318-Jun-08 5:08
bonkers12318-Jun-08 5:08 
GeneralRe: MFC CListCtrl Memory management Pin
David Crow18-Jun-08 5:15
David Crow18-Jun-08 5:15 
GeneralRe: MFC CListCtrl Memory management Pin
bonkers12318-Jun-08 22:23
bonkers12318-Jun-08 22:23 
QuestionHow to get VC++ version installed? Pin
ben217-Jun-08 9:28
ben217-Jun-08 9:28 
AnswerRe: How to get VC++ version installed? Pin
ThatsAlok18-Jun-08 2:51
ThatsAlok18-Jun-08 2:51 
Question"extern inline" in C header file Pin
crewchill17-Jun-08 8:27
crewchill17-Jun-08 8:27 
AnswerRe: "extern inline" in C header file Pin
Joe Woodbury17-Jun-08 15:02
professionalJoe Woodbury17-Jun-08 15:02 
AnswerRe: "extern inline" in C header file Pin
Nibu babu thomas17-Jun-08 17:11
Nibu babu thomas17-Jun-08 17:11 
Questionhow to change the back ground color of Label at runtime Pin
ramnathrn17-Jun-08 8:16
ramnathrn17-Jun-08 8:16 
QuestionRe: how to change the back ground color of Label at runtime Pin
David Crow17-Jun-08 8:51
David Crow17-Jun-08 8:51 
QuestionC program Pin
Subhankar17-Jun-08 7:40
Subhankar17-Jun-08 7:40 
AnswerRe: C program Pin
Alan Balkany17-Jun-08 8:26
Alan Balkany17-Jun-08 8:26 
QuestionRe: C program Pin
David Crow17-Jun-08 8:52
David Crow17-Jun-08 8:52 
AnswerRe: C program Pin
bulg17-Jun-08 13:44
bulg17-Jun-08 13:44 

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.