SyntaxFix
Write A Post
Hire A Developer
Questions
For new you should use delete. For new[] use delete[]. Your second variant is correct.
new
delete
new[]
delete[]