Click here to Skip to main content
16,004,782 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC classes in my class Pin
jmkhael26-Apr-04 6:36
jmkhael26-Apr-04 6:36 
GeneralRe: MFC classes in my class Pin
pie26-Apr-04 6:42
pie26-Apr-04 6:42 
GeneralRe: MFC classes in my class Pin
jmkhael26-Apr-04 6:43
jmkhael26-Apr-04 6:43 
GeneralRe: MFC classes in my class Pin
pie26-Apr-04 6:46
pie26-Apr-04 6:46 
GeneralRe: MFC classes in my class Pin
jmkhael26-Apr-04 6:50
jmkhael26-Apr-04 6:50 
GeneralRe: MFC classes in my class Pin
pie26-Apr-04 6:52
pie26-Apr-04 6:52 
GeneralRe: MFC classes in my class Pin
jmkhael26-Apr-04 6:55
jmkhael26-Apr-04 6:55 
GeneralRe: MFC classes in my class Pin
David Crow26-Apr-04 6:47
David Crow26-Apr-04 6:47 
pie wrote:
How smart is it to store a pointer if the object you added to the vector goes out of scope?

If the object was allocated on the heap, it won't go out of scope per se. It will still exist until delete is called. In other words:

void MyClass::SomeFunction( void )
{
    SomePtr *ptr = new SomePtr;
    m_vector.Add(ptr);
}
Even though ptr goes out of scope, the memory that it points to is still alive and well.


"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)


GeneralRe: MFC classes in my class Pin
David Crow26-Apr-04 6:49
David Crow26-Apr-04 6:49 
GeneralRe: MFC classes in my class Pin
pie26-Apr-04 6:50
pie26-Apr-04 6:50 
GeneralRe: MFC classes in my class Pin
David Crow26-Apr-04 7:03
David Crow26-Apr-04 7:03 
GeneralRe: MFC classes in my class Pin
pie26-Apr-04 7:05
pie26-Apr-04 7:05 
GeneralRe: MFC classes in my class Pin
Navin26-Apr-04 6:57
Navin26-Apr-04 6:57 
GeneralRe: MFC classes in my class Pin
Paul Ranson26-Apr-04 8:11
Paul Ranson26-Apr-04 8:11 
GeneralRe: MFC classes in my class Pin
pie26-Apr-04 8:18
pie26-Apr-04 8:18 
GeneralRe: MFC classes in my class Pin
Nemanja Trifunovic26-Apr-04 8:25
Nemanja Trifunovic26-Apr-04 8:25 
GeneralPrinting problem Pin
Acetate26-Apr-04 6:22
Acetate26-Apr-04 6:22 
GeneralRe: Printing problem Pin
David Crow26-Apr-04 6:29
David Crow26-Apr-04 6:29 
GeneralRe: Printing problem Pin
Acetate26-Apr-04 6:43
Acetate26-Apr-04 6:43 
GeneralRe: Printing problem Pin
David Crow26-Apr-04 6:53
David Crow26-Apr-04 6:53 
GeneralRe: Printing problem Pin
CodeBrain26-Apr-04 21:01
CodeBrain26-Apr-04 21:01 
GeneralRe: Printing problem Pin
Acetate27-Apr-04 3:41
Acetate27-Apr-04 3:41 
GeneralRe: Printing problem Pin
CodeBrain2-May-04 1:36
CodeBrain2-May-04 1:36 
QuestionEasy encryption way in windows? Pin
richard sancenot26-Apr-04 5:56
richard sancenot26-Apr-04 5:56 
AnswerRe: Easy encryption way in windows? Pin
jmkhael26-Apr-04 6:13
jmkhael26-Apr-04 6:13 

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.