←back to thread

39 points mattrighetti | 1 comments | | HN request time: 0s | source
Show context
sgbeal ◴[] No.45074556[source]
There is no safe, reliable, cross-environment way to deal with closing a DLL. A DLL initialization function can allocate arbitrary resources, some of which may be in use by clients of the DLL when it is closed.

The only safe, consistent, reliable approach is not to close DLLs.

replies(6): >>45074649 #>>45074720 #>>45075478 #>>45075558 #>>45075726 #>>45080214 #
immibis ◴[] No.45075558[source]
There is no safe, reliable, cross-environment way to deal with deallocating memory. A memory block can be referenced from arbitrary locations, some of which may be on the stack by clients of the memory block when it isndeallocated.

The only safe, consistent, reliable approach is not to deallocate memory.

replies(3): >>45075570 #>>45076060 #>>45077479 #
1. zbentley ◴[] No.45075570[source]
You joke, but there are programs that do exactly this.