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

Managed C++/CLI

 
GeneralRe: Dll throws when loaded from a network path Pin
doug_ayers17-Sep-08 9:19
doug_ayers17-Sep-08 9:19 
GeneralRe: Dll throws when loaded from a network path Pin
Scott Dorman17-Sep-08 9:37
professionalScott Dorman17-Sep-08 9:37 
QuestionCallback and buffer overrun message Pin
Robert Swan16-Sep-08 11:28
Robert Swan16-Sep-08 11:28 
QuestionRe: Callback and buffer overrun message Pin
Mark Salsbery16-Sep-08 11:48
Mark Salsbery16-Sep-08 11:48 
AnswerRe: Callback and buffer overrun message Pin
Robert Swan17-Sep-08 11:49
Robert Swan17-Sep-08 11:49 
GeneralRe: Callback and buffer overrun message Pin
Robert Swan11-Oct-08 9:26
Robert Swan11-Oct-08 9:26 
GeneralRe: Callback and buffer overrun message Pin
Mark Salsbery11-Oct-08 9:35
Mark Salsbery11-Oct-08 9:35 
QuestionHandles and destructors - C++/CLI Pin
N a v a n e e t h15-Sep-08 16:41
N a v a n e e t h15-Sep-08 16:41 
ref class MyDummy
{
public:
	void SayHelloTo(String ^str)
	{
		Console::WriteLine(str);
	}

	~MyDummy()
	{
		Console::WriteLine("Destructor called");
	}
};

int main(array<System::String ^> ^args)
{
	MyDummy ^myDummy = gcnew MyDummy();
	myDummy->SayHelloTo("Name1");
	delete myDummy;
	myDummy->SayHelloTo("Name2"); //This worked
    return 0;
}
In the above code, I am deleting handle myDummy after first call to SayHelloTo method. I can see that the destructor is getting executed but the next call to SayHelloTo after delete, worked correctly. How this can happen? After destruction, how it can be used again?

Any help would be great

All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

How to use google | Ask smart questions

AnswerRe: Handles and destructors - C++/CLI Pin
George L. Jackson16-Sep-08 6:53
George L. Jackson16-Sep-08 6:53 
GeneralRe: Handles and destructors - C++/CLI Pin
N a v a n e e t h16-Sep-08 19:19
N a v a n e e t h16-Sep-08 19:19 
GeneralRe: Handles and destructors - C++/CLI Pin
Scott Dorman17-Sep-08 1:29
professionalScott Dorman17-Sep-08 1:29 
AnswerRe: Handles and destructors - C++/CLI Pin
Scott Dorman17-Sep-08 1:28
professionalScott Dorman17-Sep-08 1:28 
GeneralRe: Handles and destructors - C++/CLI Pin
N a v a n e e t h17-Sep-08 2:04
N a v a n e e t h17-Sep-08 2:04 
GeneralRe: Handles and destructors - C++/CLI Pin
Scott Dorman17-Sep-08 3:06
professionalScott Dorman17-Sep-08 3:06 
GeneralRe: Handles and destructors - C++/CLI Pin
N a v a n e e t h17-Sep-08 5:17
N a v a n e e t h17-Sep-08 5:17 
GeneralRe: Handles and destructors - C++/CLI Pin
N a v a n e e t h17-Sep-08 16:47
N a v a n e e t h17-Sep-08 16:47 
GeneralRe: Handles and destructors - C++/CLI Pin
Scott Dorman17-Sep-08 17:27
professionalScott Dorman17-Sep-08 17:27 
QuestionReference Casting question. Pin
peterdrozd11-Sep-08 3:07
peterdrozd11-Sep-08 3:07 
AnswerRe: Reference Casting question. Pin
led mike11-Sep-08 4:35
led mike11-Sep-08 4:35 
AnswerRe: Reference Casting question. Pin
Mark Salsbery11-Sep-08 4:56
Mark Salsbery11-Sep-08 4:56 
GeneralRe: Reference Casting question. Pin
led mike11-Sep-08 5:02
led mike11-Sep-08 5:02 
GeneralRe: Reference Casting question. Pin
Mark Salsbery11-Sep-08 5:10
Mark Salsbery11-Sep-08 5:10 
GeneralRe: Reference Casting question. Pin
led mike11-Sep-08 5:37
led mike11-Sep-08 5:37 
GeneralRe: Reference Casting question. Pin
Mark Salsbery11-Sep-08 5:42
Mark Salsbery11-Sep-08 5:42 
QuestionRe: Reference Casting question. Pin
led mike11-Sep-08 5:45
led mike11-Sep-08 5:45 

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.