点击或拖拽改变大小

Functions.ClassDestroy 方法

X#
Remove the class object of class.

命名空间:  XSharp.XPP
程序集:  XSharp.XPP (在 XSharp.XPP.dll 中) 版本:2.22 GA
语法
 FUNCTION ClassDestroy(
	uObject
) AS LOGIC CLIPPER
查看代码

参数

uObject (Optional)
类型:__Usual
The name of the class whose class object should be deleted, or the class object.

返回值

类型:Boolean
The return value is .T. (true) when the class object is removed from memory, otherwise it is .F. (false).
备注
The function ClassDestroy() removes the class object of a dynamically created class from main memory. Dynamic classes are created during runtime by the ClassCreate() function. They are unknown at compile time. Therefore, they do not have a class function and are represented at runtime of a program only by a class object.
When a program uses a dynamic class, the corresponding class object should be removed from main memory when the class is no longer needed. Otherwise, the class object remains in memory and can be retrieved by the ClassObject() function at any time.
NoteIn X# classes are never really freed from memory. The .Net framework does not allow that. ClassDestroy() does remove the class from the list of active classes. If you recreate the same class later with the same structure then the class definition from the previous defintion is reused.
参见