| | |
Builder cpp 6 - resources problem
![]() |
•
•
Join Date: Dec 2008
Posts: 10
Reputation:
Solved Threads: 0
I made an application in Builder C++ 6.
It contains few graphic elements, few image lists. I use drawing on Canvas.
After short using my application, following message appears: "out of system resources". After it, my application behaves strangly and freezes. I use onPaint event.
My exe weights 2200 KB
It contains few graphic elements, few image lists. I use drawing on Canvas.
After short using my application, following message appears: "out of system resources". After it, my application behaves strangly and freezes. I use onPaint event.
My exe weights 2200 KB
•
•
•
•
I made an application in Builder C++ 6.
It contains few graphic elements, few image lists. I use drawing on Canvas.
After short using my application, following message appears: "out of system resources". After it, my application behaves strangly and freezes. I use onPaint event.
My exe weights 2200 KB
The causes of memory leaks are not always glaringly obvious, but put in some breakpoints and step through your program and try to debug what is going on.
I'm sure you'll track it down eventually.
It's likely to be in a function that gets called often.
It could very well be something in your OnPaint() code.
The size of the final executable has no bearing on it's memory usage. Basically, what is happening is your program is allocating memory and never freeing/deleting it. Eventually your pc runs out of memory and your program is crashing.
There is no automatic garbage collection in C/C++, so any memory resources you allocate in your program must be freed.
You must ensure that 'delete' is called on any objects created using the 'new' keyword before they drop out of scope. Similarly any memory that has been allocated using alloc() or malloc() must be freed by a call to free().
Sometimes memory leaks can be the trickiest things in the world to pin down, other times they are so obvious you just want to kick yourself!
As long as you have a good debugging technique, you should be able find the cause of the problem.
I hope this is of some help!
Cheers for now,
Jason
There are 10 types of people in this world.....
Those who understand binary .....
And those who don't!
Those who understand binary .....
And those who don't!
![]() |
Other Threads in the C++ Forum
- Previous Thread: Memory Access Violation
- Next Thread: Testing whether function is interruptable or not
| Thread Tools | Search this Thread |
api array based binary bitmap c++ c/c++ char class classes code coding compaitibility compile console conversion count delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error factorial file floatingpoint forms fstream function functions game givemetehcodez graph guessing gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker loop looping loops map math matrix maze memory multiple net news node oop output parameter payment pointer problem program programming project projectassignmenthelp protection python random rank read recursion reference rpg skills string strings temperature template test text text-file tree url variable vector video win32 windows winsock wordfrequency wxwidgets





