The Trunk: Kernel-ul.410.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Kernel-ul.410.mcz

commits-2
Levente Uzonyi uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ul.410.mcz

==================== 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)!