Click here to Skip to main content
15,890,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to clear Object memory of Map Pin
Richard MacCutchan4-Oct-11 1:11
mveRichard MacCutchan4-Oct-11 1:11 
GeneralRe: How to clear Object memory of Map Pin
002comp4-Oct-11 2:22
002comp4-Oct-11 2:22 
GeneralRe: How to clear Object memory of Map Pin
Richard MacCutchan4-Oct-11 2:25
mveRichard MacCutchan4-Oct-11 2:25 
AnswerRe: How to clear Object memory of Map Pin
ThatsAlok3-Oct-11 23:53
ThatsAlok3-Oct-11 23:53 
GeneralRe: How to clear Object memory of Map [ how to delete newed object tht we store in map] Pin
002comp4-Oct-11 0:10
002comp4-Oct-11 0:10 
AnswerRe: How to clear Object memory of Map [ how to delete newed object tht we store in map] Pin
ThatsAlok4-Oct-11 21:07
ThatsAlok4-Oct-11 21:07 
AnswerRe: How to clear Object memory of Map Pin
Stefan_Lang4-Oct-11 5:56
Stefan_Lang4-Oct-11 5:56 
SuggestionRe: How to clear Object memory of Map Pin
ThatsAlok4-Oct-11 20:55
ThatsAlok4-Oct-11 20:55 
Stefan_Lang wrote:
Second, don't store pointers, store the objects instead. That way you'll save one pointer entry per entry, and the map will destroy the objects once you remove the entry from the map.


For discussion sake, if we kept object instead, still it will create copy of original object (see it call copy constructor,if not properly implemented, there can be problem of shallow copy and dangling pointers), however the only advantage i know would be you don't need to worry about destruction as OOPS by heart take responsibility of destroying of object!

Regards
Alok

"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixture


cheers,
Alok Gupta
VC Forum Q&A :- I/IV
Support CRY- Child Relief and You

GeneralRe: How to clear Object memory of Map Pin
Stefan_Lang4-Oct-11 21:50
Stefan_Lang4-Oct-11 21:50 
QuestionApplication getting carshed in release mode not in debug, in the follwing scenario Pin
Amrit Agr3-Oct-11 19:49
Amrit Agr3-Oct-11 19:49 
AnswerRe: Application getting carshed in release mode not in debug, in the follwing scenario Pin
Madhu Nair3-Oct-11 20:23
Madhu Nair3-Oct-11 20:23 
GeneralRe: Application getting carshed in release mode not in debug, in the follwing scenario Pin
Amrit Agr3-Oct-11 21:16
Amrit Agr3-Oct-11 21:16 
AnswerRe: Application getting carshed in release mode not in debug, in the follwing scenario Pin
Roger Allen4-Oct-11 2:06
Roger Allen4-Oct-11 2:06 
GeneralRe: Application getting carshed in release mode not in debug, in the follwing scenario Pin
David Crow4-Oct-11 4:59
David Crow4-Oct-11 4:59 
QuestionNeed vital help about MFC - ADO.Net (SQL connection) Pin
symeramon3-Oct-11 10:00
symeramon3-Oct-11 10:00 
AnswerMessage Removed Pin
3-Oct-11 10:16
TheGreatAndPowerfulOz3-Oct-11 10:16 
GeneralRe: Need vital help about MFC - ADO.Net (SQL connection) Pin
symeramon3-Oct-11 11:03
symeramon3-Oct-11 11:03 
GeneralMessage Removed Pin
3-Oct-11 11:19
TheGreatAndPowerfulOz3-Oct-11 11:19 
GeneralRe: Need vital help about MFC - ADO.Net (SQL connection) Pin
Richard Andrew x643-Oct-11 11:28
professionalRichard Andrew x643-Oct-11 11:28 
GeneralRe: Need vital help about MFC - ADO.Net (SQL connection) Pin
symeramon3-Oct-11 20:36
symeramon3-Oct-11 20:36 
GeneralRe: Need vital help about MFC - ADO.Net (SQL connection) Pin
David Crow4-Oct-11 4:51
David Crow4-Oct-11 4:51 
QuestionRe: Need vital help about MFC - ADO.Net (SQL connection) Pin
David Crow3-Oct-11 10:59
David Crow3-Oct-11 10:59 
AnswerRe: Need vital help about MFC - ADO.Net (SQL connection) Pin
symeramon3-Oct-11 11:10
symeramon3-Oct-11 11:10 
JokeRe: Need vital help about MFC - ADO.Net (SQL connection) Pin
Albert Holguin3-Oct-11 15:46
professionalAlbert Holguin3-Oct-11 15:46 
AnswerRe: How to fill a combo box from a SQL database (c# code) Pin
Software_Developer3-Oct-11 21:11
Software_Developer3-Oct-11 21:11 

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.