Click here to Skip to main content
15,892,809 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to make form border invisible ? Pin
Jose Lamas Rios8-Aug-05 20:07
Jose Lamas Rios8-Aug-05 20:07 
Generaltype conversion Pin
Member 20725788-Aug-05 18:30
Member 20725788-Aug-05 18:30 
GeneralRe: type conversion Pin
ThatsAlok8-Aug-05 18:34
ThatsAlok8-Aug-05 18:34 
GeneralRe: type conversion Pin
Christian Graus8-Aug-05 19:07
protectorChristian Graus8-Aug-05 19:07 
GeneralRe: type conversion Pin
Jose Lamas Rios8-Aug-05 19:46
Jose Lamas Rios8-Aug-05 19:46 
GeneralRe: type conversion Pin
Member 20725789-Aug-05 6:16
Member 20725789-Aug-05 6:16 
GeneralRe: type conversion Pin
Jose Lamas Rios9-Aug-05 6:48
Jose Lamas Rios9-Aug-05 6:48 
GeneralWeird Memory Issues Pin
LighthouseJ8-Aug-05 17:39
LighthouseJ8-Aug-05 17:39 
I'm trying to rewrite a console application with more efficiency and I am getting nailed by memory assertions. The biggest difference is that I'm deriving my own objects from CObject and my own list from CObList but that's not where I'm having a problem. I wrote my own iterator but something is calling it's destructor and goes down in flames. I have this now:
<br />
Iterator * iterator = new Iterator();<br />
<br />
for (iterator->Clear(); (!(iterator->MaximumValueReached())); (*iterator)++) {<br />
... does work ...<br />
}<br />

The iterator code works fine in the previous version of the code and I didn't touch it since then. Execution happens once through then goes back up to the for, it iterates fine, exits to the above for loop and immediately enters the destructor. The only time I delete this iterator (on purpose) is in the destructor of the class member this code is in and that's much later.

Also, in the iterator I have a pointer to a struct. The struct exists by using 'new' and it crashes when I 'delete' it.

To note: I was having problems by an assertion being thrown because _CrtCheckMemory returns false which I found out means that there is some counter that counts my mallocs and when it hits 1023, it throws the assertion. This problem mentioned at the beginning of this message started occuring before this assertion so I don't have access to that problem but the two might be related. I might start by changing my old malloc/free statements to new/delete.

Any help to this would be much appreciated. I don't know why I'm getting memory issues just by a couple class derivation rewrites, hopefully you can help me.
GeneralRe: Weird Memory Issues Pin
Christian Graus8-Aug-05 17:56
protectorChristian Graus8-Aug-05 17:56 
GeneralRe: Weird Memory Issues Pin
LighthouseJ9-Aug-05 4:19
LighthouseJ9-Aug-05 4:19 
GeneralRe: Weird Memory Issues Pin
Jose Lamas Rios8-Aug-05 18:25
Jose Lamas Rios8-Aug-05 18:25 
GeneralRe: Weird Memory Issues Pin
LighthouseJ9-Aug-05 4:27
LighthouseJ9-Aug-05 4:27 
GeneralRe: Weird Memory Issues Pin
Jose Lamas Rios9-Aug-05 4:49
Jose Lamas Rios9-Aug-05 4:49 
GeneralRe: Weird Memory Issues Pin
LighthouseJ9-Aug-05 4:54
LighthouseJ9-Aug-05 4:54 
GeneralRe: Weird Memory Issues Pin
John R. Shaw8-Aug-05 18:59
John R. Shaw8-Aug-05 18:59 
GeneralRe: Weird Memory Issues (solved this, another problem though) Pin
LighthouseJ9-Aug-05 4:55
LighthouseJ9-Aug-05 4:55 
GeneralRe: Weird Memory Issues (solved this, another problem though) Pin
Jose Lamas Rios9-Aug-05 5:31
Jose Lamas Rios9-Aug-05 5:31 
GeneralRe: Weird Memory Issues (solved this, another problem though) Pin
LighthouseJ9-Aug-05 10:28
LighthouseJ9-Aug-05 10:28 
GeneralFound What I Needed Pin
LighthouseJ9-Aug-05 13:59
LighthouseJ9-Aug-05 13:59 
GeneralRe: Weird Memory Issues (solved this, another problem though) Pin
John R. Shaw9-Aug-05 9:20
John R. Shaw9-Aug-05 9:20 
GeneralRe: Weird Memory Issues Pin
cmk9-Aug-05 1:03
cmk9-Aug-05 1:03 
GeneralRe: Weird Memory Issues Pin
LighthouseJ9-Aug-05 5:06
LighthouseJ9-Aug-05 5:06 
Generalread and write the structure to file Pin
pnpfriend8-Aug-05 12:58
pnpfriend8-Aug-05 12:58 
GeneralRe: read and write the structure to file Pin
Tim Smith8-Aug-05 13:15
Tim Smith8-Aug-05 13:15 
GeneralRe: read and write the structure to file Pin
pnpfriend9-Aug-05 3:37
pnpfriend9-Aug-05 3:37 

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.