How to fix message sent to deallocated error

49 Views Asked by At

I am passing two string using delegate to the parent controller while I pop to the parent controller.

    if (![clientIdd length] == 0)
    {
        [self.clientIdDelegate passClientId:clientIdd andCouncelorId:councelorId];

        [self.navigationController popViewControllerAnimated:YES];
    }

I enabled Zombies and am getting an error like this:

[CFString respondsToSelector:]: message sent to deallocated instance 0x7a77f8e0.

Can anyone help?

1

There are 1 best solutions below

0
Chirag Bhutani On

Check whether clientIdd is NSNull using the following code.

if(clientIdd == (id)[NSNull null])

if it is the case then find out the reason for clientIdd becoming null in your code.