〜ProcessQueue()是什么意思?..我问波浪号 [英] what is the meaning of ~ProcessQueue() ?.. im asking about the tilde

查看:123
本文介绍了〜ProcessQueue()是什么意思?..我问波浪号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨盖兹,
方法〜ProcessQueue()中的代字号(〜)是什么意思

hi guyz,
what is the meaning tilde(~) in a method ~ProcessQueue()

thanks in advance!

推荐答案

这意味着它是ProcessQueue类的Finalize方法的定义.感谢您的询问.从Google那里获得答案非常琐碎,以至于我不知道您为什么要这么做,但是我不知道,现在我知道了.
It means that it''s the definition of the Finalise method for the ProcessQueue class. Thanks for asking this. Getting the answer from google was so trivial that I don''t know why you needed to, but I did not know this, and now I do.


您必须创建了通过类ProcessQueue中的名称ProcessQueue()进行命名.当您编写〜ProcessQueue()时,它将调用destructor.析构函数是释放类实例的特殊方法.仅在不再需要该对象时才调用析构函数.

注意:.Net框架会自动清理类使用的内存,即使您不调用它也是如此.
You must have created a constructor by name ProcessQueue() within the class ProcessQueue. When you write ~ProcessQueue(), it calls the destructor. A destructor is a special method that releases the instance of class. The destructor is called only when the object is no more required.

Note: The .Net framework automatically cleans up the memory used by the class even when you don''t call it.


这是一个析构函数.
您可以阅读以下内容以了解其在C#中的工作原理(因为C/C ++中的析构函数有很大的不同):
http://www.c-sharpcorner.com/UploadFile/chandrahundigam/UnderstandingDestructors11192005021208AM/UnderstandingDestructors.aspx [ ^ ]
This is a destructor.
You may read this to understand how it works in C# (since destructors in C/C++ are sligthly different):
http://www.c-sharpcorner.com/UploadFile/chandrahundigam/UnderstandingDestructors11192005021208AM/UnderstandingDestructors.aspx[^]


这篇关于〜ProcessQueue()是什么意思?..我问波浪号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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