|
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?
|
|
|
|
|
Why would you ever need to do something like that ?
|
|
|
|
|
Actually i hv to update a mesh that i m creating .I m getting all that information in header file and i hv to include that file .But every time i cant include it manually na?Thats y i need it.
Psuedocode:
fn(){
// creating a header file with name sample.h
________
_______
___
#include"sample.h"
}
so inspite of giving it manually I want at run time.
|
|
|
|
|
If you don't want to rebuild every time the header file changes, you're going to have to add code to read that file at run-time and interpret and use the information in it.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
yes,exactly like that.Is any other way to do it.
|
|
|
|
|
That's probably about the easiest way to do it without calling the C compiler from your program, compiling the header into some DLL or something and using that from your program. Yeah, that's definitely the easiest way to do it.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
You can't do something like that without recompiling your program (which I guess you don't want to do). What you will need to do is instead load your data from a file and store it in a structure in memory.
|
|
|
|
|
yogeshs wrote: Actually i hv to update a mesh that i m creating
You are doing some 3D stuff I guess ? How are you creating your mesh ? How do you 'export' it (what the data structure you are using to store it) ?
|
|
|
|
|
yes,i m working in 3d.I m saving all my data in class and using that data but that is not working when i tried with header file then it works thats y i was asking for run time header file.
Do u have any idea to do that?
Yogesh
|
|
|
|
|
Yes, like I said earlier you have to save it in a file: either binary format or your own format. But I asked some information and you didn't provide any usefull information, so it will be difficult to help you.
I guess you don't really understand what I and Stuart are telling you about these files. Ok, let me explain you that another way: when you save a word document for instance, everything gets saved to a file and when you load the document, Word opens this document and read the information out of it. Well, you have to do something similar in your application: you load your data from the file. Thus you will need to use CFile or std::ifstream to read the file contents and store them in memory.
yogeshs wrote: Do u have any idea to do that?
Forget about that idea of runtime header, that's not something which is possible.
|
|
|
|
|
For example you have two header file: h1.h h2.h
Their contents are something like: content1 content2 respectly.
You load it at the begining of your program to two vars.
Then you can use any of them when you need.
You can also load either of them when you need, it depends on the size of the header files and other things.
Hope it helps.
|
|
|
|
|
Hi All
How can i Zip folder through code?I have folder A which size is 30MB .How can i compress folder a through code?Plz help me
|
|
|
|
|
|
Thanks for reply.i go through this but it's showing to many error.Ca you give some more idia.
|
|
|
|
|
Davitor wrote: Thanks for reply.i go through this but it's showing to many error.Ca you give some more idia.
Do you feel the need to tell 'what' errors?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
What were errors?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
|
Hi,
Can anyone help with using Smart card and winscard.lib in embedded visual c++ (WinCE 5.0).
I am trying to establish context with the smart card resource manager using the following sample code from MSDN.
// Establish the context.
lReturn = SCardEstablishContext(SCARD_SCOPE_USER,
NULL,
NULL,
&hSC);
if ( SCARD_S_SUCCESS != lReturn )
{
-
-
}
else
{
// Use the context as needed. When done,
// free the context by calling SCardReleaseContext.
// ...
}
However, I get the following compiler error:
error LNK2019:: Unresolved external symbol 'SCardEstablishContext ...'.
fatal error: 1 unresolved external(s).
I have included the header file, ie
#include "winscard.h"
and add in the linker option to link the library, ie
Project>>Settings>>SettingsFor (AllConfiguration)>>Input>>Object/LibraryModules
Below this there is an edit box where i specified
winscard.lib
I also gave the path where this library is present in the "Additional library path:" option
"C:\Documents and Settings\Desktop\Sample
the library is present in the sample folder in the desktop
but I still get the error.
Can someone please help me?
Thanks!
|
|
|
|