On Jun 27, 2013, at 4:11 , Igor Stasenko wrote: > >> Or is a disclaimer not to use the class for, say, 'char*' elements more >> appropriate? >> > no , it should be fine.
Was thinking of that in conjunction with putting ST object refs in the External arrays, the trying to pass as parameters, it could be a recipe for disaster :) Like, say: "Add a null at end so ExternalArrays basic #readString won't keep on readin'" string := 'Hello world!' copyWith: (Character value: 0). extArray := (NBExternalArray ofType: 'char*') new: 1. "Tenure the string first, lest we invalidate on next scavenge" Smalltalk garbageCollectMost. extArray at:1 put: string. "X our fingers, and hope GC doesn't move string. Often serves as a nice example that it will :)" (extArray at: 1) readString string at: 7 put: $W. (extArray at: 1) readString Cheers, Henry
