If a finalize method calls only its parent, and then the method can simply be removed. For example.
如果一个finalize方法只调用它的父类,那么该方法就应当被移除。
Try to find some code with a finalize method that calls only super.finalize so that you can test the rule.
尝试通过一个只调用super .finalize的finalize方法,以便您可以测试该规则。
In Listing 2, the effect of the check on the value argument is negated by the existence of the finalize method.
在清单2中,finalize方法的存在使对value参数的检查变得无效。
When an object with a finalize method becomes unreachable, it is put on a queue to be processed at some later time.
当包含finalize方法的对象变得无法访问时,它会被放入一个将在以后某个时刻处理的队列上。
Finalization of objects with the finalize method the last thread to exit a scope is used to finalize all objects within.
使用finalize方法终结对象退出范围的最后一个线程用于终结范围中的所有对象。
In this case, for every matching method declaration (the finalize method), a result is created where the name is highlighted.
在这种情况下,对于每一个匹配的方法声明来说(finalize方法),被创建的结果的名称都将被突出。
Given that it is possible for a developer to create a finalize method that returns a value, you need your rule to ignore those.
假定开发人员有可能创建一个具有返回值的finalize方法,那么您就需要让您的规则忽略掉它们。
Notice that, in this case, the only solution is to remove the finalize method; therefore, no solution example code is included.
注意,在这种情形下,唯一的解决方案是清除这个finalize方法method;因此,不包含解决方案例子。
When the heap object's finalize method is run and its memory freed, the SoftReference object is added to its ReferenceQueue, if it exists.
当heap对象的finalize方法被运行而且该对象占用的内存被释放,S of tReference对象就被添加到它的ReferenceQueue(如果后者存在的话)。
When the heap object's finalize method is run and its memory freed, the WeakReference object is added to its ReferenceQueue, if it exists.
当heap对象的finalize方法被运行而且该对象占用的内存被释放时,WeakReference对象就被添加到它的ReferenceQueue(如果后者存在的话)。
If the source code in the workbench has code with a finalize method that fits your rule, the analysis results view will contain a result like the one that Figure 8 shows.
如果工作台中的源代码拥有一个满足您的规则的finalize方法,那么分析结果视图将包含一个如图8中所示的结果。
The prepare method is invoked to finalize the initialization of the MediaRecorder.
调用prepare方法完成 MediaRecorder的初始化。
A parameter indicates whether this method can wait a short interval before returning, to allow the system to collect garbage and finalize objects.
参数会指出这个方法是否可以先等待短暂间隔后再传回,以便让系统回收记忆体和最终处理物件。
A parameter indicates whether this method can wait a short interval before returning, to allow the system to collect garbage and finalize objects.
参数会指出这个方法是否可以先等待短暂间隔后再传回,以便让系统回收记忆体和最终处理物件。
应用推荐