Y
Hacker News
new
|
ask
|
show
|
jobs
by
dmytrish
252 days ago
> pass around the allocator to every function that allocates to the heap.
what prevents a library from taking an allocator, saving it hidden somewhere and using it silently?
2 comments
simjnd
251 days ago
Nothing, but it would be bad design (unless there is a legitimate documented reason for it). Then it's up to you as the developer to exercise your judgment and choose what third-party libraries you choose to depend on.
link
ulbu
252 days ago
authors of the library
link