Re: [cpp] 初次光临,请多指教
孙华明
sunhm at neusoft.com
Mon Jul 10 16:08:47 CST 2006
是啊怎么崩溃的?
没有内存泄露啊,好像也没有空指针访问啊。
----- Original Message -----
From: ling
To: C++ Discuss Group
Sent: Monday, July 10, 2006 10:19 AM
Subject: [cpp] 初次光临,请多指教
今天看了c++对话系列,为什么说下面的类程序会因为内存问题而崩溃呢?
#include "xStruct.h" // definition of struct X
class xWrapper
{
X* xItem;
public:
xWrapper() : xItem(new X) { }
~xWrapper() { delete xItem; }
void dump() { /* dumps xItem to cout */ }
};
------------------------------------------------------------------------------
_______________________________________________
Cpp mailing list
Cpp at codingnow.com
http://codingnow.com/mailman/listinfo/cpp
----------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Group Ltd., its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful. If you have received this communication in error, please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you.
-----------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codingnow.com/pipermail/cpp/attachments/20060710/1cf34a0d/attachment-0001.html
More information about the Cpp
mailing list