GnuSmalltalkUsersGuide:BaseChapter 213

From 흡혈양파의 번역工房
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
WeakKeyDictionary

WeakKeyDictionary

네임스페이스 Smalltalk에 정의됨

슈퍼클래스: Dictionary

범주: 컬렉션-Weak


나는 일반 Dictionary와 비슷하지만 나의 키는 약한 배열에 보관된다; 나는 그 중에 어떤 것이 쓰레기로 수집되는지를 추적하고, 그에 해당하는 대상을 마주칠 때마다 쓰레기로 수집된 키에 대한 모든 연관을 즉시 제거한다.


WeakKeyDictionary 클래스: hacks

postLoad

객체가 로딩된 후 호출된다; 'preStore'가 호출되기 이전 상태로 복구되어야 한다. 다시 약하게 만들어라.


WeakKeyDictionary: 접근하기

add: anAssociation

값을 주어진 키와 연관된 것으로 보관하라.

at: key put: value

값을 주어진 키와 연관된 것으로 보관하라.


Notes