Click here to Skip to main content
15,921,169 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionRun time Error Pin
Programm3r18-Dec-06 5:24
Programm3r18-Dec-06 5:24 
Questionpointers to functions Pin
emrah.a17-Dec-06 3:49
emrah.a17-Dec-06 3:49 
GeneralRe: pointers to functions Pin
bsaksida17-Dec-06 4:58
bsaksida17-Dec-06 4:58 
QuestionMuthithreading Pin
bsaksida16-Dec-06 11:22
bsaksida16-Dec-06 11:22 
AnswerRe: Muthithreading Pin
Mark Salsbery16-Dec-06 12:47
Mark Salsbery16-Dec-06 12:47 
GeneralRe: Muthithreading Pin
bsaksida16-Dec-06 23:22
bsaksida16-Dec-06 23:22 
AnswerRe: Muthithreading Pin
Michael Dunn16-Dec-06 12:51
sitebuilderMichael Dunn16-Dec-06 12:51 
QuestionQuestion about the built in memory leak detection in vs05 Pin
FocusedWolf15-Dec-06 14:45
FocusedWolf15-Dec-06 14:45 
I'm playing with this for first time. Anyhoot.. in the output its telling me that the leak occured in crtdbg.h instead of Test.h. Is this normal behavior?

<br />
#define _CRTDBG_MAP_ALLOC<br />
#include <stdlib.h><br />
#include <crtdbg.h><br />
<br />
#include "Test.h" //include a class that leaks<br />
<br />
int main()<br />
{<br />
	// Send all reports to cout when program exits<br />
	//http://msdn2.microsoft.com/en-us/library/ezb1wyez(VS.80).aspx<br />
    _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE );<br />
    _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDOUT );<br />
    _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE );<br />
    _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDOUT );<br />
    _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE );<br />
    _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDOUT );<br />
<br />
	// couts all memory leak reports when program exits<br />
	//http://msdn2.microsoft.com/en-us/library/e5ewb1h3(VS.80).aspx<br />
	_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );<br />
<br />
<br />
<br />
<br />
<br />
	_ASSERT(false); //testing assert cout thing<br />
<br />
	int * leakyInt = new int; //testing memory leak<br />
<br />
	Test test; //this class hase same pointer leak in its constructor<br />
<br />
	return 0;<br />
}<br />
<br />
//what console shows after executing<br />
<br />
/*<br />
d:\f\backup\wolf's documents\visual studio 2005\projects\vsleaktest\vsleaktest\m<br />
ain.cpp(25) : Assertion failed!<br />
Detected memory leaks!<br />
Dumping objects -><br />
c:\program files\microsoft visual studio 8\vc\include\crtdbg.h(1147) : {56} norm<br />
al block at 0x00354DA8, 4 bytes long.<br />
 Data: <    > CD CD CD CD<br />
c:\program files\microsoft visual studio 8\vc\include\crtdbg.h(1147) : {55} norm<br />
al block at 0x00354D78, 4 bytes long.<br />
 Data: <    > CD CD CD CD<br />
Object dump complete.<br />
Press any key to continue . . .<br />
*/<br />
<br />
<br />
//this is what Test.h looks like<br />
<br />
/*<br />
#ifndef TEST<br />
#define TEST<br />
<br />
class Test<br />
{<br />
public:<br />
	Test()<br />
	{<br />
		int * leakyInt = new int;<br />
	}<br />
};<br />
<br />
#endif <br />
*/<br />

AnswerRe: Question about the built in memory leak detection in vs05 Pin
George L. Jackson15-Dec-06 20:12
George L. Jackson15-Dec-06 20:12 
AnswerRe: Question about the built in memory leak detection in vs05 Pin
Mark Salsbery16-Dec-06 10:53
Mark Salsbery16-Dec-06 10:53 
GeneralRe: Question about the built in memory leak detection in vs05 Pin
FocusedWolf16-Dec-06 15:09
FocusedWolf16-Dec-06 15:09 
QuestionHosting a Windows Forms Control in a MFC ActiveX control Pin
sps-itsec4615-Dec-06 6:59
sps-itsec4615-Dec-06 6:59 
AnswerRe: Hosting a Windows Forms Control in a MFC ActiveX control Pin
sps-itsec463-Jan-07 0:56
sps-itsec463-Jan-07 0:56 
QuestionOverride property Pin
bsaksida15-Dec-06 4:47
bsaksida15-Dec-06 4:47 
AnswerRe: Override property Pin
George L. Jackson15-Dec-06 20:28
George L. Jackson15-Dec-06 20:28 
GeneralRe: Override property Pin
bsaksida16-Dec-06 11:18
bsaksida16-Dec-06 11:18 
QuestionMulti Instance. Pin
bsaksida15-Dec-06 1:21
bsaksida15-Dec-06 1:21 
AnswerRe: Multi Instance. Pin
prasad_som15-Dec-06 2:38
prasad_som15-Dec-06 2:38 
GeneralRe: Multi Instance. Pin
bsaksida15-Dec-06 4:48
bsaksida15-Dec-06 4:48 
QuestionHide Form Pin
mactick14-Dec-06 19:26
mactick14-Dec-06 19:26 
AnswerRe: Hide Form Pin
bsaksida14-Dec-06 19:56
bsaksida14-Dec-06 19:56 
GeneralRe: Hide Form Pin
mactick14-Dec-06 20:20
mactick14-Dec-06 20:20 
GeneralRe: Hide Form Pin
bsaksida14-Dec-06 20:26
bsaksida14-Dec-06 20:26 
GeneralRe: Hide Form Pin
mactick14-Dec-06 20:56
mactick14-Dec-06 20:56 
QuestionHow to access another forms members ?? Pin
Programm3r14-Dec-06 18:27
Programm3r14-Dec-06 18:27 

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.