[squeak-dev] Squeak 6.0: Graphics-mt.531.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jan 23 12:21:58 UTC 2023


Marcel Taeumel uploaded a new version of Graphics to project Squeak 6.0:
http://source.squeak.org/squeak60/Graphics-mt.531.mcz

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

Name: Graphics-mt.531
Author: mt
Time: 23 January 2023, 1:21:56.866167 pm
UUID: 0e5b64e3-dd2a-3245-a8c4-46b1fa72db3c
Ancestors: Graphics-mt.530

Fix issue of leaking file handles in our new GIFReadWriter.

=============== Diff against Graphics-mt.530 ===============

Item was changed:
  ----- Method: GIFReadWriter class>>formsFromFileNamed: (in category 'image reading/writing') -----
+ formsFromFileNamed: aFilePath
+ 
+ 	^ self formsFromStream: (FileStream readOnlyFileNamed: aFilePath)!
- formsFromFileNamed: aFile
- 	^ (self on: aFile asDirectoryEntry readStream binary)
- 			readHeader;
- 			readBody;
- 			yourself!

Item was changed:
  ----- Method: GIFReadWriter class>>formsFromStream: (in category 'image reading/writing') -----
  formsFromStream: aBinaryStream
+ 
+ 	| result |
+ 	self flag: #misnomer. "mt: This message does NOT return a collection of forms."
+ 	result := (self on: aBinaryStream)
- 	^ (self on: aBinaryStream)
  		readHeader;
  		readBody;
+ 		yourself.
+ 	
+ 	self flag: #workaround. "mt: Avoid leaking open file handles."
+ 	result close.
+ 	
+ 	^ result!
- 		yourself!



More information about the Squeak-dev mailing list