Click here to Skip to main content
15,912,021 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: what does IN mean when declaring variables? Pin
scottwalk11-Jan-05 9:56
scottwalk11-Jan-05 9:56 
GeneralSpecial Character with TextOut Pin
Anonymous11-Jan-05 8:17
Anonymous11-Jan-05 8:17 
GeneralRe: Special Character with TextOut Pin
basementman11-Jan-05 8:56
basementman11-Jan-05 8:56 
GeneralMemory Management across DLLs Pin
Member 155768211-Jan-05 8:10
Member 155768211-Jan-05 8:10 
GeneralRe: Memory Management across DLLs Pin
Blake Miller11-Jan-05 12:16
Blake Miller11-Jan-05 12:16 
GeneralRe: Memory Management across DLLs Pin
12-Jan-05 13:28
suss12-Jan-05 13:28 
GeneralRe: Memory Management across DLLs Pin
Bo Hunter12-Jan-05 13:25
Bo Hunter12-Jan-05 13:25 
GeneralRe: Memory Management across DLLs Pin
digwizfox13-Jan-05 7:39
digwizfox13-Jan-05 7:39 
So what's the verdict? This is a really interesting thread and I'd like to know if any conclusions were reached.

Based on Peter's description, the memory is getting allocated in the program. Peter, you said that class A was embedded in class B right? And you said that class B was instantiated in the main application right? So essentially, the library contains the class declaration for A but the main application project contains the actual code that runs and instantiated objects, deletes objects, displays data to the console, and so on and so forth. Is that right? I do this all the time with no problems. The class in the library needs to be exported so that the program can compile and link properly. Obviously you've done that else it wouldn't have compiled and linked. But I have never instantiated something in a DLL and then passed the destruction responsibility to another DLL or .exe. That would seem like a strange implementation to me; anyway.


I don't know what you mean by the "Delete" statement defined in library.dll. The delete statement is basic C++ syntax. It's not defined in the DLL. I don't know what you mean by saying that. It sounds like your library.dll is simply declaring the class. That has no bearing on where and how the class can be created or destroyed. Any project (dll or the main project) should be able to link to the class declaration in your library, instantiate it's own version of the object and subsequently delete it. Is there any special code in the destructor of Class A?

It'd be nice to see some code snips of class B and A so we have some idea of the complexity of the classes, especially what specifically, is being done in the destructor of each class. Oh and some snips of code where you instantiate and delete the object would be nice to see as well.

GeneralCommand Line String Replacer Pin
Joel Holdsworth11-Jan-05 7:40
Joel Holdsworth11-Jan-05 7:40 
GeneralRe: Command Line String Replacer Pin
David Crow11-Jan-05 8:58
David Crow11-Jan-05 8:58 
GeneralRe: Command Line String Replacer Pin
basementman11-Jan-05 9:15
basementman11-Jan-05 9:15 
GeneralRe: Command Line String Replacer Pin
Axter11-Jan-05 12:35
professionalAxter11-Jan-05 12:35 
GeneralRe: Command Line String Replacer Pin
basementman12-Jan-05 3:35
basementman12-Jan-05 3:35 
GeneralRe: Command Line String Replacer Pin
Joel Holdsworth12-Jan-05 2:28
Joel Holdsworth12-Jan-05 2:28 
GeneralRe: Debug Question Pin
BlackDice11-Jan-05 7:27
BlackDice11-Jan-05 7:27 
GeneralSimple question - Threads and Timers Pin
no_reg_name11-Jan-05 5:36
no_reg_name11-Jan-05 5:36 
GeneralRe: Simple question - Threads and Timers Pin
ThatsAlok11-Jan-05 6:45
ThatsAlok11-Jan-05 6:45 
GeneralRe: Simple question - Threads and Timers Pin
Blake Miller11-Jan-05 7:18
Blake Miller11-Jan-05 7:18 
GeneralRe: Simple question - Threads and Timers Pin
PJ Arends11-Jan-05 9:16
professionalPJ Arends11-Jan-05 9:16 
GeneralRe: Simple question - Threads and Timers Pin
basementman11-Jan-05 9:18
basementman11-Jan-05 9:18 
GeneralRe: Simple question - Threads and Timers Pin
PJ Arends11-Jan-05 9:52
professionalPJ Arends11-Jan-05 9:52 
GeneralRe: Simple question - Threads and Timers Pin
basementman11-Jan-05 9:17
basementman11-Jan-05 9:17 
GeneralDisabling only the menubar/toolbars of the mainframe Pin
Maximilien11-Jan-05 4:18
Maximilien11-Jan-05 4:18 
GeneralRe: Disabling only the menubar/toolbars of the mainframe Pin
Ravi Bhavnani11-Jan-05 4:26
professionalRavi Bhavnani11-Jan-05 4:26 
GeneralRe: Disabling only the menubar/toolbars of the mainframe Pin
basementman11-Jan-05 5:40
basementman11-Jan-05 5:40 

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.