Click here to Skip to main content
15,936,499 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Passing a class (pointer) to library - Linux Pin
Richard MacCutchan1-Jun-24 1:47
mveRichard MacCutchan1-Jun-24 1:47 
GeneralRe: BUMP Re: Passing a class (pointer) to library - Linux Pin
Richard MacCutchan4-Jun-24 2:02
mveRichard MacCutchan4-Jun-24 2:02 
QuestionHow C++ manage memory in event driven system ? Pin
Salvatore Terress30-May-24 4:44
Salvatore Terress30-May-24 4:44 
AnswerRe: How C++ manage memory in event driven system ? Pin
Richard MacCutchan30-May-24 5:47
mveRichard MacCutchan30-May-24 5:47 
AnswerRe: How C++ manage memory in event driven system ? Pin
k505430-May-24 5:58
mvek505430-May-24 5:58 
GeneralRe: How C++ manage memory in event driven system ? Pin
Salvatore Terress30-May-24 7:09
Salvatore Terress30-May-24 7:09 
GeneralRe: How C++ manage memory in event driven system ? Pin
Richard MacCutchan30-May-24 9:09
mveRichard MacCutchan30-May-24 9:09 
GeneralRe: How C++ manage memory in event driven system ? Pin
k505430-May-24 9:47
mvek505430-May-24 9:47 
When we talk about a library we generally mean a DLL (.so in linux world) or static library (.a in linux) that is linked in with your code. That being the case, there is only one instance of any given library during the execution of a single process1, even if its multi threaded. Either you don't understand this, or you're using the term library to refer to something else. If the latter, you need to explain your concerns differently.

The difference between a DLL and a static library, in case you don't know, is that the functions in a static library are linked in at compile time, while dynamic libraries are linked in at run time. That means that when a change is introduced in a library (bug fix, for example), a program that is linked against a static library needs to be relinked after the static library has been compiled and installed. A program that is linked against a DLL gets the benefit of the change the next time it is run, without the need to relink it.

1There is a way to get multiple copies of a shared library attached to a single process, but that involves using dlopen() and friends, which I assume you're not doing here.

Update: Just checked, multiple calls to dlopen() does not attach multiple instances of a library to a process, so ignore that bit.
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown


modified 30-May-24 15:56pm.

GeneralRe: How C++ manage memory in event driven system ? Pin
Salvatore Terress30-May-24 12:54
Salvatore Terress30-May-24 12:54 
QuestionUPDATE CLOSED error: declaration of anonymous class must be a definition Pin
Salvatore Terress25-May-24 5:49
Salvatore Terress25-May-24 5:49 
AnswerRe: error: declaration of anonymous class must be a definition Pin
k505425-May-24 6:25
mvek505425-May-24 6:25 
GeneralRe: error: declaration of anonymous class must be a definition Pin
Salvatore Terress25-May-24 8:26
Salvatore Terress25-May-24 8:26 
GeneralRe: error: declaration of anonymous class must be a definition Pin
Richard MacCutchan25-May-24 21:21
mveRichard MacCutchan25-May-24 21:21 
GeneralRe: error: declaration of anonymous class must be a definition Pin
k505427-May-24 5:26
mvek505427-May-24 5:26 
AnswerRe: error: declaration of anonymous class must be a definition Pin
RedDk26-May-24 9:42
RedDk26-May-24 9:42 
GeneralRe: error: declaration of anonymous class must be a definition Pin
Salvatore Terress28-May-24 3:52
Salvatore Terress28-May-24 3:52 
QuestionUPDATE REPOST BUMP How to construct / build / interpret regular expression ? Pin
Salvatore Terress24-May-24 6:31
Salvatore Terress24-May-24 6:31 
AnswerRe: How to construct / build / interpret regular expression ? Pin
Richard MacCutchan25-May-24 4:28
mveRichard MacCutchan25-May-24 4:28 
AnswerRe: SOLVED How to construct / build / interpret regular expression ? Pin
jschell27-May-24 12:18
jschell27-May-24 12:18 
GeneralRe: SOLVED How to construct / build / interpret regular expression ? Pin
Salvatore Terress28-May-24 4:21
Salvatore Terress28-May-24 4:21 
QuestionOkay, real C++ question - who makes use of the auto keyword? Pin
charlieg19-May-24 1:29
charlieg19-May-24 1:29 
AnswerRe: Okay, real C++ question - who makes use of the auto keyword? Pin
Mircea Neacsu19-May-24 2:28
Mircea Neacsu19-May-24 2:28 
GeneralRe: Okay, real C++ question - who makes use of the auto keyword? Pin
Richard Andrew x6419-May-24 3:11
professionalRichard Andrew x6419-May-24 3:11 
AnswerRe: Okay, real C++ question - who makes use of the auto keyword? Pin
Dave Kreskowiak19-May-24 4:54
mveDave Kreskowiak19-May-24 4:54 
AnswerRe: Okay, real C++ question - who makes use of the auto keyword? Pin
CPallini19-May-24 20:27
mveCPallini19-May-24 20:27 

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.