Skip to content

Files

Latest commit

 

History

History
11 lines (6 loc) · 443 Bytes

useAutoPointerArray.md

File metadata and controls

11 lines (6 loc) · 443 Bytes

Pattern: Use of auto_ptr array

Issue: -

Description

Object pointed by an auto_ptr is destroyed using operator delete. This means that you should only use auto_ptr for pointers obtained with operator new. This excludes arrays, which are allocated by operator new[] and must be deallocated by operator delete[].

Further Reading