|
|
I hereby bestow on you a "brighter" name:
China_Kevin
Carry it with honor.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
You lie to me~~~~~
That a walloping huge lie!! 
|
|
|
|
|
Me too~ 
|
|
|
|
|
I got the idea and I known how to do it.
thank you both Luc Pattyn and Cédric Moonen~ 
|
|
|
|
|
why do not think me~~~~~o(∩_∩)o...哈哈 
|
|
|
|
|
I concur with Cédric.
Use assert to discover logic flaws in your program while debugging, don't use it to detect exceptional circumstances, things that go wrong not because there is an error in your program, but because the circumstances are against you, as in a missing file. Hence:
#define null NULL
if (fp==null) {
} else {
}
modified on Friday, April 17, 2009 2:59 PM
|
|
|
|
|
Please no C# ing here.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
sorry, I meant NULL of course. Or ZERO, ZILCH, RIENDUTOUT, NADA, NIENTE, whatever you fancy.
|
|
|
|
|
Well I see you agree with me (and Rajesh, I suppose): C/C++ 's NULL is more imperative than C# cheap fake one.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hear hear...
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi All,
i have one win32 exe and after executing it, in the task manager the memory usage is increasing even there is nothing to process for exe.At the starting its size is 150kb but it is increasing up to 10 mb. so please can anyone tell me the possible reasons and solutions.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
you have memory leak.
check your program that every new function match a delete function.
remember to release every resource you have got.
|
|
|
|
|
hi,
i checked new/delete sequence there is all fine, is there anything else which can cause memory leak or how can i detect memory leak...
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
|
You have got tools to detect whether you have a memory leak. Search for BoundsChecker or Rationals Purify plus.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Hi Anshuman,
i serched for both the tool and i think purifyplus is free downlable but i dont know how to use it so can you please tell me which tool ishould use(depending its a freeware) and where i can get details of using the tool as i didnt got anything on it after googling....
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
Does your debugger report memory leaks in the output window after your binary finishes execution (in debug mode)?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
 actually i used dbgcntrl apis which shows me dumped memory leaks like this:
strcore.cpp(118) : {83} normal block at 0x008C2F50, 156 bytes long.
Data: < Prov> 01 00 00 00 8F 00 00 00 8F 00 00 00 50 72 6F 76
strcore.cpp(118) : {80} normal block at 0x008C10B0, 33 bytes long.
Data: < C:\P> 02 00 00 00 14 00 00 00 14 00 00 00 43 3A 5C 50
strcore.cpp(118) : {77} normal block at 0x008C1150, 18 bytes long.
Data: < 5555> 01 00 00 00 05 00 00 00 05 00 00 00 35 35 35 35
strcore.cpp(118) : {74} normal block at 0x008C1190, 26 bytes long.
Data: < 192.> 01 00 00 00 0D 00 00 00 0D 00 00 00 31 39 32 2E
{62} normal block at 0x008C14B0, 33 bytes long.
Data: < C > 00 43 00 CD CD CD CD CD CD CD CD CD CD CD CD CD
{61} normal block at 0x008C1500, 40 bytes long.
Data: < |L > 14 7C 4C 10 16 00 00 00 00 00 00 00 00 00 00 00
{59} client block at 0x008C1610, subtype 0, 64 bytes long.
a CDynLinkLibrary object at $008C1610, 64 bytes long
{54} client block at 0x008C1790, subtype 0, 64 bytes long.
a CDynLinkLibrary object at $008C1790, 64 bytes long
{52} client block at 0x008C18B0, subtype 0, 64 bytes long.
a CDynLinkLibrary object at $008C18B0, 64 bytes long
Object dump complete.
but i dont have strcore.cpp file in my workspace and i dont understand the meaning of other errors....
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
Hi,
these add up to a few KB at most, and won't explain what you are seeing. So there probably is no memory leak.
Are you allocating some large data structures, say an array of several MB, even when there isn't any reason to already allocate such?
|
|
|
|
|
Actually i am receiving some data from server which i am taking in a char * array and after end of story i am deleting it.....and there is nothing big array i am processing with axcept above one....
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
Ash_VCPP wrote: {62} normal block at 0x008C14B0, 33 bytes long.
Data: < C > 00 43 00 CD CD CD CD CD CD CD CD CD CD CD CD CD
{61} normal block at 0x008C1500, 40 bytes long.
Data: < |L > 14 7C 4C 10 16 00 00 00 00 00 00 00 00 00 00 00
{59} client block at 0x008C1610, subtype 0, 64 bytes long.
There are probably source files where new isn't redefined to DEBUG_NEW (probably you added some C/C++ files yourself?). Try to add this definition to all the source files where it isn't present:
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
This will enable the debugger to display the exact line numbers in your program where there were memory allocations (that weren't cleaned up).
Ash_VCPP wrote: but i dont have strcore.cpp file in my workspace and i dont understand the meaning of other errors....
Leaks at strcore.cpp most likely means that you are misusing strings in your program (improper shutdown/termination of a thread that was using strings?). That becomes too much of a big topic to discuss in a reply.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
If your codes is not very long,put it out. We can find the problem for you. I think that must be a memory leak.
I am a Chinese boy.My English is poor...
|
|
|
|
|
I have a little confused by how to calculate the duration of AAC audio,i read the ISO/IEC 13818-7,but find no answer,now i don't know where to find the formula to calculate the duration.
I can get the sample rate(ADTS) or bit rate(ADIF),maybe it's no use of calcalating the duration,who can help me?thanks.
I'm sorry for my poor english.
|
|
|
|
|
Hello Friends
Can i include header file at run time? and how?
|
|
|
|