Re: I don't understand why this is leaking...
Re: I don't understand why this is leaking...
- Subject: Re: I don't understand why this is leaking...
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Tue, 12 Aug 2008 19:09:35 +0700
On 12 Aug 2008, at 18:05, Graham Cox wrote:
On 12 Aug 2008, at 8:40 pm, Gerriet M. Denkmann wrote:
I'm sure if it weren't someone would have raised merry hell about
it before now. Something's fishy...
Reminds of a very rational being walking the streets with his son.
The son: "Hey dad, there's a hundred dollar note!"
Dad: "No son, this cannot be. If the note were real, somebody
would have picked it up long ago".
OK, fair comment. But let's look at the string you can't store:
$null
This reminds *me* of the old joke: "Doctor, doctor, it hurts when I
do this!" (...) "Well, don't do that then..."
If that's the one string you can't store, presumably because it's
used as a marker within the archive, then don't try to store what
is a reserved byte sequence.
It it were a reserved word, it would be documented so.
Fact is, there is absolutly no need for reserved words.
Nil should be stored as a reference to $objects[0], which is
incidentally (as it has to be something) a string with value $null.
And on unarchiving the unarchiver should check whether the string is
a reference to the first object (and return nil) or else return its
value (be it $null or whatever).
Checking the value and returning nil if it is $null is a rather silly
bug.
For its purpose, you can find an easy way around it. What you
seemed to be implying was that there is a whole class of string
sequences that broke keyed archiving, which of course would be far
worse than this one apparently reserved string.
Yes, my statement: "can store only certain strings" while absolutely
correct, was kind of sensational.
And I admit that there are situations where the "convenience of keyed
archiving" outweights the memory bloat (even *by far*) - and that
there are other situation where it is more important to keep files or
memory small.
Kind regards,
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden