when ending my app in the debugger, memory leaks will be shown like this:
Detected memory leaks!
Dumping objects ->
C:PROGRAM FILESVISUAL STUDIOMyProjectsleaktestleaktest.cpp(20) : {18}
normal block at 0x00780E80, 64 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.
How can I tell Visual c++ also to show me the memory leaks in a called dll?
i build an application, that makes the used memory growing. i don't get any error(unless, i believe, that i use some memory value(i don't know the value), but i see the memory growing very slowly. how can i detect the memory leak?
I have been told to show some text document when our application starts up, it is an EULA. They gave me a word file and I saved this file in a .rtf format. I then wish to show this in a dialog box and found this on code guru: [URL]
Which seems to be a sub-class that will do all the formatting for me. So I use that class and then load in the .rtf file, using their setRTF method I just get an empty text box.
I just want to be able to show this formatted, somewhat pretty text from this document in my application as close as I can to the original document. Is there an easy way to do that? I could turn it into plain text, but I think that my boss would not be happy about that.
The problem was that I needed the text box to be marked multi-line.
I have problem reading CSV file, i found many solutions but i still got one problem. I need to read CSV file and then these values show in List Control and here i have problem. Idk how to display it in List?
I am writing a employee payroll program using structures. My program is running but its only showing some of the data.
HERES MY CODE
Code: #include <iostream> #include <cstdio> #include <fstream> #include <string> #include <iomanip> #include <cstring> using namespace std; const int SZ = 20; // size of arrays to hold scores struct payrollStruct {
[Code] ....
And it doesn't show anything from txt file
Code: 40.0 10.00 A1234 Jane Adams 50.0 10.00 L8765 Mary Lincoln 25.5 10.85 W7654 Martha Washington 52.0 15.75 A9876 John Adams 45.0 25.00 W1235 George Washington
The code below is supposed to fill, show, and revalue property. The fill function is supposed to return a pointer that creates a range of property values. The show function is supposed to show the property values entered and the revalued property values. I think part of the problem is the returned pointer from the fill function. Once that is cleared up, I think I will find more problems.
Code:
#include <iostream> const int Max = 5; // function prototypes double fill_array(double ar[], int limit); void show_array(double * begin, double * end);
The following program takes user input into two arrays and should then determine how many items are different by comparing them with a loop. The comparison always show zero correct answers.
#include <iostream> using namespace std; const int QUESTION = 20; //class for testing grades class TestGrader {
I have a CMFCToolbar containing a CMFCComboBoxButton which needs to be updated via a view. The view correctly updates the selection of the ComboBoxButton however the edit window is not updated until the control receives the focus or the entire window is redrawn.
How can I force the redrawing of the control to show the updated selection via the view
The point of this is to calculate the total of the monthly costs of these 6 expenses and then to show the annual cost. However, there's just a couple of things that's giving me problems and it's the calcMonCost in my code. The error says that it is more than one instance of overload function and also that an unresolved external symbol. Everything else is fine. What does this mean?
I have a JPEG in memory as a char* and a bytesize, if I save it to disk with a .jpg extension it's a perfect JPEG file. The thing is, I don't want to save it unless it's a minimum width/height. I got it into memory using a socket recv() call. What should I do ?
I am using CByteArray as a buffer in Visual C++. I want to preallocate nSize memory for for CByteArray, so that later when I try to change the buffer, by calling SetSize, Add, Remove, etc., as long as all these operations are within nSize, CByteArray will not try to release the memory or reallocate the memory, so to eliminate the possibility of memory fragments in heap. Is that possible?
I am developing a Visual C++ application. There is an object called CMyObject, as follows:
typedef CMap<UINT, UINT, void *, void*> CMyMap; class CMyObject { public: CMyMap *m_pMyMap; "Some other member variables" }
Some instances of CMyObject contains a map, some not. Therefore, to save memory, I define a pointer m_pMyMap and create a new CMap object only if the instance contains a map.
When I test my app, with the increase of the CMyObject instance, the number of memory blocks allocated and deallocated is also increasing. There are a lot of fragments during this period. To prevent this, I try to override the new/delete operator for CMyObject and CMyMap. But still find many fragments. So I try to trace into the MFC source codes for CMap. I find CMap is just using an internal buffer to store the hash table(m_pHashTable), as follows:
m_pHashTable = new CAssoc* [nHashSize];
And for each hash entry, it uses:
P = (CPlex *)new BYTE[sizeof(CPlex) + nMax *cbElement];
To allocate the spaces.
I believe these two may be the reason of the memory fragments and want to eliminate them. However, is there a way to override the new/delete operator for codes such as:
new CAssoc* [nHashSize] and (CPlex *)new BYTE[sizeof(CPlex) + nMax *cbElement]
So that the spaces will be allocated from my own memory manager instead of from the default heap?
I get a memory leak error for every instance where a CString is set. I tried moving this to the MainFrame just to see if there was something with this being in the app, and saw the same memory leak errors.
I didn't include the functions in this class that manipulate this table. I didn't put it in the document because this is a multi-doc application and this table is universal to the program.
Is this an example of a false positive in the memory leak checker, or did I do something wrong?
I have a MFC app that has a CDHtmlDialog embedded in it. During run time i update the HTML content from the C++ code. There's a IMAGE tag in the content and the SRC for the tag is updated multiple times in a second to show different images.
Basically i go over a WHILE loop in the C++ and call a JavaScript function to update the "src" for the "img" tag.
The issue am seeing is that, after running this code for a while the application kinda hangs and the system takes up lot's of memory.
How to solve this, as all the code that's in the browser side of app is HTML & JavaScript. I looked through the C++ code plugged all memory leaks there.
When running my code in Visual Studio, there is a particular point in the code where my program is crashing. To debug this, I am adding a break point in Debug mode just before that point, and observing what happens as I step through the code. However, to get to this break point in the code takes about a minute of running the program. So I'm wondering if there is a tool in Visual Studio to reload the state of a program's memory from a previous run, so that I can immediately get to the break point without having to wait for a minute each time?
I am getting "driver could not be loaded due to system error 8" error while connecting to SQL Server 2005 from VC++. Its also throwing out of memory error. Basically i am developing and ISAPI dll. I use the following code to connect to DB.