I have an application in which I am trying to send a string from one view controller to another. It's all working fine when the strings having no spaces. If they do have spaces then the app is crashing with memmory leaks. This is how i am doing it:
RegisterViewController2 *register2viewcontroller = [[RegisterViewController2 alloc] initWithNibName:@"RegisterViewController2" bundle:nil];
register2viewcontroller.username2=[usernamestring retain];
register2viewcontroller.email2=[emailstring retain];
register2viewcontroller.password2=[passwordstring retain];
register2viewcontroller.date=[agestring retain];
register2viewcontroller.gender2=[gendustring retain];
register2viewcontroller.occupation2=[occustring retain];
[self.navigationController pushViewController:register2viewcontroller animated:YES];
The username2 & usernamestrings are class variables having nonatomic, and strong properties. Can anybody help me?