You deleted the pointer to a integer, not the integer itself. --- On Mon, 8/16/10, .Aikilis <[email protected]> wrote:
From: .Aikilis <[email protected]> Subject: [c-prog] Question:Struct pointer[C++] To: "C-Prog邮件讨论组[英文]" <[email protected]> Date: Monday, August 16, 2010, 8:06 AM struct TestStruct { int *p; }; TestStruct *TP; TP=new TestStruct; (*TP).p=new int; delete TP; Is p free? [Non-text portions of this message have been removed] [Non-text portions of this message have been removed]
