I just declared a third NSMutableArray to see if that one would have a different pointer, and well it had the same pointer somehow...
what is this ?

is it some type of setting ?

Sandro Noel.

On 16-Nov-08, at 11:22 PM, Sandro Noel wrote:

Greetings.

I'm having a weird behaviour, i have 2 arrays declared in the same controller, and for some reason they both share the same memory space. well actually in debug they share the same pointer, witch is not something I asked for.

the bonjourservices and the mounts array's are the ones geting the same pointer.

here is my code.

                NSMutableArray *bonjourServices;
                NSMutableArray *mounts;


transportTypes = [NSArray arrayWithObjects:@"afp",@"smb",@"cifs",@"nfs",nil];
                
                mounts = [[NSMutableArray alloc] init];
[mounts initWithContentsOfFile:[[self applicationSupportFolder] stringByAppendingPathComponent:@"Bonjour Mounter.plist"]];
                
// the bonjourScanner sends a notification when the content of the passed array is modified, we will pick it up here.
                [[NSNotificationCenter defaultCenter]
                 addObserver:self
                 selector:@selector(bonjourServiceNotigficationUpdate)
                 name:SERVICE_ADD_REMOVE_NOTIFICATION
                 object:nil];
                
                bonjourServices = [[NSMutableArray alloc]init];
                
                AFPScanner = [[BonjourScanner alloc]init];
                SMBScanner = [[BonjourScanner alloc]init];
                NFSScanner = [[BonjourScanner alloc]init];
                AFPScanner.bonjourServices = bonjourServices;
                SMBScanner.bonjourServices = bonjourServices;
                NFSScanner.bonjourServices = bonjourServices;
                
                [AFPScanner searchForService:@"_afpovertcp._tcp." domain:nil];
                [SMBScanner searchForService:@"_smb._tcp." domain:nil];
                [NFSScanner searchForService:@"_nfs._tcp." domain:nil];

did anyone ever have that kind of problem ? i'm a little puzzled,
thank you ...

Sandro Noel.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/sandro.noel%40mac.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to