[squeak-dev] The Trunk: Kernel-ul.410.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Feb 26 14:15:47 UTC 2010

Levente Uzonyi uploaded a new version of Kernel to project The Trunk:

==================== Summary ====================

Name: Kernel-ul.410
Author: ul
Time: 26 February 2010, 3:13:26.593 pm
UUID: d5442399-f708-f940-9ef6-17ebccd4a654
Ancestors: Kernel-nice.409

- use the new way to create an ObjectFinalizer

=============== Diff against Kernel-nice.409 ===============

Item was changed:
  ----- Method: Object>>toFinalizeSend:to:with: (in category 'finalization') -----
  toFinalizeSend: aSelector to: aFinalizer with: aResourceHandle
  	"When I am finalized (e.g., garbage collected) close the associated resource handle by sending aSelector to the appropriate finalizer (the guy who knows how to get rid of the resource).
  	WARNING: Neither the finalizer nor the resource handle are allowed to reference me. If they do, then I will NEVER be garbage collected. Since this cannot be validated here, it is up to the client to make sure this invariant is not broken."
  	self == aFinalizer ifTrue:[self error: 'I cannot finalize myself'].
  	self == aResourceHandle ifTrue:[self error: 'I cannot finalize myself'].
  	^self finalizationRegistry add: self executor:
+ 		(ObjectFinalizer
- 		(ObjectFinalizer new
  			receiver: aFinalizer
  			selector: aSelector
  			argument: aResourceHandle)!

More information about the Squeak-dev mailing list