德尔福垃圾收集 [英] Garbage Collection in Delphi

查看:126
本文介绍了德尔福垃圾收集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Delphi是否具有垃圾收集

Does Delphi have Garbage Collection?

推荐答案

简单回答否。

Delphi不是一个完整的垃圾回收语言,用户定义的类型应该手动分配和释放。它仅提供了一些内置类型的自动收集,例如字符串,动态数组和接口,以方便使用。

Delphi is not a complete garbage collection language, user-defined types should be manually allocated and deallocated. It only provide automatic collection, for a few built-in types, such as strings, dynamic arrays and interfaces for ease of use.

但是您可以使用使用引用的接口在某种程度上计数垃圾收集。

But you can use interfaces which uses reference counting for garbage collection for some extent.

这篇关于德尔福垃圾收集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆