java - "__________ for Java"作为 "free in C"或 "delete in C++"

标签 java

Java中使用什么关键字或函数来释放内存?

最佳答案

您不会在 Java 中释放内存。它是 garbage collected由 JVM。

Objects are created by Java's "new" operator, and memory for new objects is allocated on the heap at run time. Garbage collection is the process of automatically freeing objects that are no longer referenced by the program.

关于java - "__________ for Java"作为 "free in C"或 "delete in C++",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3499937/

相关文章:

java - Camel文件组件: create a file and if already exist,移动它并用时间戳重命名它

java - 如何删除字符串中问号(?)后面的尾随字符?

java - 循环队列实现使用单链表vs双链表vs数组?

java - Jaxb 使用 "get"而不是 "is"前缀创建 boolean 方法访问器名称

JavaFX Windows 10 native bundle 部署 - 异常访问冲突

java - 使用 vbscript/java 在 NTLM 身份验证后自动下载动态生成的文件

java - 在intellij中找不到符号(路径)

java - 想要将 ArrayList<HashMap<String, Object>> 转换为字符串

java - 关联 Java 字段类型和泛型参数

java - 返回未排序列表中第 n 个最高值的索引