RayeRen/MiniPhotoShop

Layouts.h中应使用智能指针

RayeRen opened this issue · 0 comments

@Maryeon

class LAYOUTS{
protected:
    vector<BaseShape*>list;
};

改为

class LAYOUTS{
protected:
    vector< shared_ptr<BaseShape> >list;
};

使用智能指针防止内存泄漏