Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to pass parameter (pointer) to function ? Pin
k505419-Oct-23 17:16
mvek505419-Oct-23 17:16 
AnswerRe: How to pass parameter (pointer) to function ? Pin
CPallini19-Oct-23 20:54
mveCPallini19-Oct-23 20:54 
GeneralRe: How to pass parameter (pointer) to function ? Pin
Salvatore Terress20-Oct-23 7:22
Salvatore Terress20-Oct-23 7:22 
GeneralRe: How to pass parameter (pointer) to function ? Pin
Salvatore Terress20-Oct-23 8:23
Salvatore Terress20-Oct-23 8:23 
AnswerRe: How to pass parameter (pointer) to function ? Pin
Richard MacCutchan19-Oct-23 21:48
mveRichard MacCutchan19-Oct-23 21:48 
QuestionSOLVED "value optimized out " C++ error Pin
Salvatore Terress18-Oct-23 5:39
Salvatore Terress18-Oct-23 5:39 
AnswerRe: "value optimized out " C++ error Pin
Richard MacCutchan18-Oct-23 5:47
mveRichard MacCutchan18-Oct-23 5:47 
AnswerRe: "value optimized out " C++ error Pin
k505418-Oct-23 7:47
mvek505418-Oct-23 7:47 
Warning messages out of context are not very helpful. We don't know for at fact that the messages you provided to us are anything to do with the supplied code.
IMHO it seems highly unlikely that the value being optimized out is responsible for the possible memory leak. If the compiler can reason that it can optimize away a variable, it should know that no memory clean up is needed. But cleanup may be part of the the expected tasks of the programmer, and adding it in (if needed) might remove both warnings.
Start by fixing the issue you have passing the QWidget correctly. There's no telling what doing it wrong might be doing internally. It sounds like a recipe for invoking undefined behavior.
If the warnings persist after fixing the calling issue, then start by turning off optimization. If you're on Linux, you might also make sure that you're including debug symbols (-g flag). Depending on what "the tool" is, adding in debugging symbols might help narrow down the origin of the memory leak. Consult the documentation for your IDE (QT Creator?) on how you go about setting the optimization level, and turning on inclusion of debug symbols in the executable.
Keep Calm and Carry On

AnswerRe: "value optimized out " C++ error Pin
Richard Andrew x6418-Oct-23 14:38
professionalRichard Andrew x6418-Oct-23 14:38 
QuestionBuilding .dll files using Makefile Pin
JohnCodding12-Oct-23 23:59
JohnCodding12-Oct-23 23:59 
AnswerRe: Building .dll files using Makefile Pin
Mircea Neacsu13-Oct-23 0:31
Mircea Neacsu13-Oct-23 0:31 
GeneralRe: Building .dll files using Makefile Pin
JohnCodding13-Oct-23 0:59
JohnCodding13-Oct-23 0:59 
GeneralRe: Building .dll files using Makefile Pin
Mircea Neacsu13-Oct-23 1:21
Mircea Neacsu13-Oct-23 1:21 
GeneralRe: Building .dll files using Makefile Pin
JohnCodding13-Oct-23 6:13
JohnCodding13-Oct-23 6:13 
AnswerRe: Building .dll files using Makefile Pin
JohnCodding14-Oct-23 1:00
JohnCodding14-Oct-23 1:00 
QuestionGetVCPFeatureAndVCPFeatureReply fails when called Pin
Valentinor10-Oct-23 4:17
Valentinor10-Oct-23 4:17 
QuestionRe: GetVCPFeatureAndVCPFeatureReply fails when called Pin
CPallini10-Oct-23 4:22
mveCPallini10-Oct-23 4:22 
AnswerRe: GetVCPFeatureAndVCPFeatureReply fails when called Pin
Valentinor10-Oct-23 4:29
Valentinor10-Oct-23 4:29 
GeneralRe: GetVCPFeatureAndVCPFeatureReply fails when called Pin
CPallini10-Oct-23 4:53
mveCPallini10-Oct-23 4:53 
GeneralRe: GetVCPFeatureAndVCPFeatureReply fails when called Pin
Valentinor10-Oct-23 6:51
Valentinor10-Oct-23 6:51 
QuestionI'm looking for review in terms of readability, approachability of this code Pin
honey the codewitch4-Oct-23 14:37
mvahoney the codewitch4-Oct-23 14:37 
AnswerRe: I'm looking for review in terms of readability, approachability of this code Pin
Gerry Schmitz4-Oct-23 18:32
mveGerry Schmitz4-Oct-23 18:32 
GeneralRe: I'm looking for review in terms of readability, approachability of this code Pin
honey the codewitch4-Oct-23 23:36
mvahoney the codewitch4-Oct-23 23:36 
GeneralRe: I'm looking for review in terms of readability, approachability of this code Pin
Gerry Schmitz5-Oct-23 5:51
mveGerry Schmitz5-Oct-23 5:51 
AnswerRe: I'm looking for review in terms of readability, approachability of this code Pin
Richard MacCutchan4-Oct-23 20:52
mveRichard MacCutchan4-Oct-23 20:52 

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.