Thanks, everybody. Of course, you're all absolutely right, the buffer from
decodeBytesForKey is temporary. I'd just assumed the bytes would be written to
my malloced buffer, not realizing I needed to explicitly copy them.
Problem solved.
cheers,
J.
On 2010-08-02, at 10:56 AM, Graham Cox wrote
On Aug 2, 2010, at 12:46 PM, James Maxwell wrote:
> // set the contents of the array
> continuations = (float*)[aDecoder
> decodeBytesForKey:@"continuations" returnedLength:&size];
>From the header file:
- (const uint8_t *)decodeBytesForKey:(NSString *)key returne
On 03/08/2010, at 3:46 AM, James Maxwell wrote:
> continuations = (float*)[aDecoder
> decodeBytesForKey:@"continuations" returnedLength:&size];
I expect the returned bytes are autoreleased. The docs don't state this
explicitly, but the similar method -decodeBytesWithReturnedLeng
Okay, so here's the initWithCoder from the object that's giving me grief. The
variable "continuations" is a float* array, and appears to load fine from here,
but disappears once the root object is unarchived and set. I've since
discovered that, through a mistake I made at another place in the co
On Sun, Aug 1, 2010 at 3:30 PM, James Maxwell
wrote:
> Hello All,
>
> I have a strange problem with NSKeyedArchiver/Unarchiver. I have a very
> complex object graph that I want to be persistent, independently of my
> document objects, so I'm archiving it into the user's application support
> fo
On Aug 1, 2010, at 13:31, James Maxwell wrote:
> heh... yeah, that's true. But the thing is I haven't done anything different
> with this particular float* array. It's the same type of archiving I've used
> at many points in the app.
> But I hadn't thought to look for weak references could
heh... yeah, that's true. But the thing is I haven't done anything different
with this particular float* array. It's the same type of archiving I've used at
many points in the app.
But I hadn't thought to look for weak references could this be as simple as
making sure to type cast objects w
On Aug 1, 2010, at 12:30, James Maxwell wrote:
> What I don't understand is how the Hierarchy can be fine at the end of the
> Network's initWithCoder method, but then get banjaxed somehow after that.
Sure you do. Things disappear suddenly when not retained or strongly
referenced. You're descri
Hello All,
I have a strange problem with NSKeyedArchiver/Unarchiver. I have a very complex
object graph that I want to be persistent, independently of my document
objects, so I'm archiving it into the user's application support folder. The
root object for the archive is a class called Network,