On Sun, 09 Apr 2000 22:21:27 MDT, eric@xmission.com wrote: >[excellent analysis snipped] > >These are the possibilities I see: > > 1. Have the tokenizer always create a new SV for constant subs. > 2. Have peek copy the constant instead of using it directly when > it moves it to the pad. > 3. Have pad_free never remove the flags when both SVs_PADTMP and > SVs_READONLY are set. > 4. Have pad_free only remove the flags when the reference count > for the SV is 1. > >I lean towards 4 or 2. I think that 4 would be safe but it might >not always free up a pad slot when it should. 2 should also be >safe but would cause additional memory usage. I'd say peek() should make a copy when moving it to the pad if the SV is already a PADTMP. Thanks. Sarathy gsar@ActiveState.comThread Previous | Thread Next