Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
cornstalks
6y ago
0 comments
Share
Too bad it doesn't detect the mismatch between new and free.
0 comments
default
newest
oldest
peapicker
6y ago
And if you fix it to use delete instead of free, you get "can't delete void *" errors. Perhaps not the best example code.
gpderetta
6y ago
and if you fix the void->int, the warning goes away.
htfy96
6y ago
yeah that's why I changed int* to void* in the example, but I forgot to change new to malloc
j
/
k
navigate · click thread line to collapse