当然,该代码片段每次执行时,您仍然要付出分配、初始化和回收一次的代价(尽管如此,这仍然要比每次执行循环时付出相应的代价更好一些)。
Of course, you still pay for a single allocation, initialization, and collection each time this code snippet is executed (though that's still better than paying for it every time through the loop).
我们每次都会创建新的实例,而日志中显示,我们为了创建和销毁它付出了沉重的代价。
We create a new instance every time and the log shows that we're paying a heavy price to create and destroy it.
之前我们在每次拼抢中没有付出100%的努力,我们没有足够努力地去抢球。
Before that we were not giving 100 per cent in every tackle, we were not fighting for the ball enough.
应用推荐