Click here to Skip to main content
15,921,660 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Destroying Pointers and stuff Pin
Nibu babu thomas16-Mar-06 0:11
Nibu babu thomas16-Mar-06 0:11 
GeneralRe: Destroying Pointers and stuff Pin
HakunaMatada16-Mar-06 17:01
HakunaMatada16-Mar-06 17:01 
GeneralRe: Destroying Pointers and stuff Pin
Nibu babu thomas16-Mar-06 17:27
Nibu babu thomas16-Mar-06 17:27 
GeneralRe: Destroying Pointers and stuff Pin
HakunaMatada16-Mar-06 19:01
HakunaMatada16-Mar-06 19:01 
GeneralRe: Destroying Pointers and stuff Pin
Nibu babu thomas16-Mar-06 19:06
Nibu babu thomas16-Mar-06 19:06 
GeneralRe: Destroying Pointers and stuff Pin
Stephen Hewitt15-Mar-06 19:29
Stephen Hewitt15-Mar-06 19:29 
GeneralRe: Destroying Pointers and stuff Pin
HakunaMatada15-Mar-06 23:45
HakunaMatada15-Mar-06 23:45 
GeneralRe: Destroying Pointers and stuff Pin
Stephen Hewitt16-Mar-06 11:46
Stephen Hewitt16-Mar-06 11:46 
If the other function makes a copy of lpTemp, say for later use, it will call AddRef through it. When it doesn’t need the copy anymore it will call Release. What, if anything, has to be done to free the storage occupied by the pointer itself depends on where it's stored. If it's a local variable (as is typical) nothing has to be done as locals variables take care of themselves. Same for a global. If it's a member variable it depends on the storage used by the object - if it's local or global again no action needs to be takes. The exception in all of this is for heap allocated objects. If a variable in on the heap you have to free it. The rule is simple, if you new something remember to delete it.

Steve
QuestionCall back Function Pin
vivek.s.vivek15-Mar-06 18:38
vivek.s.vivek15-Mar-06 18:38 
AnswerRe: Call back Function Pin
Nibu babu thomas15-Mar-06 18:52
Nibu babu thomas15-Mar-06 18:52 
Questionstring s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
mrby12315-Mar-06 18:01
mrby12315-Mar-06 18:01 
AnswerRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
Hamid_RT15-Mar-06 18:12
Hamid_RT15-Mar-06 18:12 
GeneralRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
mrby12315-Mar-06 18:15
mrby12315-Mar-06 18:15 
GeneralRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
Hamid_RT15-Mar-06 18:17
Hamid_RT15-Mar-06 18:17 
GeneralRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
mrby12315-Mar-06 18:29
mrby12315-Mar-06 18:29 
AnswerRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
Johann Gerell15-Mar-06 20:02
Johann Gerell15-Mar-06 20:02 
GeneralRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
Nemanja Trifunovic16-Mar-06 2:13
Nemanja Trifunovic16-Mar-06 2:13 
GeneralRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
Johann Gerell16-Mar-06 2:38
Johann Gerell16-Mar-06 2:38 
GeneralRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
Nemanja Trifunovic16-Mar-06 3:08
Nemanja Trifunovic16-Mar-06 3:08 
AnswerRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
normanS15-Mar-06 18:13
normanS15-Mar-06 18:13 
AnswerRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
Nibu babu thomas15-Mar-06 18:16
Nibu babu thomas15-Mar-06 18:16 
GeneralRe: string s1 = "abcd" string s2 = "2.53", how to detect that s2 representing a numeber? Pin
mrby12315-Mar-06 18:24
mrby12315-Mar-06 18:24 
GeneralRe: string s1 = "abcd" string s2 = "2.53", how to detect that s2 representing a numeber? Pin
Nibu babu thomas15-Mar-06 18:29
Nibu babu thomas15-Mar-06 18:29 
GeneralRe: string s1 = "abcd" string s2 = "2.53", how to detect that s2 representing a numeber? Pin
mrby12315-Mar-06 18:41
mrby12315-Mar-06 18:41 
GeneralRe: string s1 = "abcd" string s2 = "2.53", how to detect that s2 representing a numeber? Pin
Nibu babu thomas15-Mar-06 18:49
Nibu babu thomas15-Mar-06 18:49 

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.