内存泄漏问题
Person 的 name 字段申请内存未释放
This commit is contained in:
parent
9f58fef2ce
commit
73993206a7
@ -5,6 +5,9 @@ struct Person
|
||||
{ //职工基本信息的结构
|
||||
double salary;
|
||||
char *name;
|
||||
~Person() {
|
||||
delete []name;
|
||||
}
|
||||
};
|
||||
class SalaryManaege
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user