如果我在堆中创建了对象并且没有删除,当我关闭应用程序时,该内存会被其他应用程序阻挡,还是干脆被释放?一般来说,C++、java等所有的S.O都是一样的。
I have knowledge about garbage collector, and delete from C++, the only question is if I don't free the memory I use in the heap if that memory is stuck (until reset the device) for others applications or not). 这可能是一个愚蠢的问题,但我真的没有读到一个明确的答复。
谢谢你
编辑:在那个帖子中,似乎所有分配的内存堆都是由每个s.o释放的,独立于languajes.o.,是正确的吗?
在关闭应用程序后,堆内存将被释放,标记为空闲.一些处理程序如文件打开处理程序可能会存在一段时间,这取决于系统。