Hi,

I am new on the list, so maybe the topic has already been discussed. However, I could not find anything in the archives.

I am developing a custom QC plug-in that outputs a large structure (1025 entries, and each of them is a 2-entries structure). When running the composition, I observe a huge memory leak (several megabytes per second). So, I was wondering about how QC manages the NSDictionary after retrieving it.

Basically, my source code look like:

- in the interface declaration:

@property(assign) NSDictionary*         outputStructure;

- in the implementation:

@dynamic outputStructure;

// ...

- (BOOL) execute:(id<QCPlugInContext>)context atTime: (NSTimeInterval)time withArguments:(NSDictionary*)arguments
{
        // ...
                
        id                      elements[1025];
        id                      keys[1025];

        for(unsigned int i=0; i<1025; ++i)
        {
                elements[i] = [NSDictionary dictionaryWithObjectsAndKeys:
                        [NSNumber numberWithFloat:someNumber, @"someKey",
                        [NSNumber numberWithFloat:someOtherNumber], 
@"someOtherKey",
                        nil];
                keys[i] = [NSNumber numberWithInt:i];
        }
        
        // leak disappears if I uncomment the following line
self. outputStructure = [NSDictionary dictionaryWithObjects:elements forKeys:keys count:1025];
                
        // ...
}


Thank you for your help,

Ambroise Confetti

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to