Skip to content

Files

Latest commit

 

History

History
11 lines (6 loc) · 402 Bytes

mallocOnClassWarning.md

File metadata and controls

11 lines (6 loc) · 402 Bytes

Pattern: Class with constructors allocated with malloc()

Issue: -

Description

Memory for class instance allocated with malloc(), but class provides constructors. This is unsafe, since no constructor is called and class members remain uninitialized. Consider using new instead.

Further Reading