I have read through many sample codes and found that,
self.Location = [[CLLocationManager alloc] init];
this kind of allocation over a retained Location
object is valid? this kind of memory management is it advisable??
I have read through many sample codes and found that,
self.Location = [[CLLocationManager alloc] init];
this kind of allocation over a retained Location
object is valid? this kind of memory management is it advisable??
Yes this is perfect, I don't see any problem here.
As, you are using MRC, You can go with
self.Location=[[[CLLocationManager alloc] init] autorelease];
or
self.Location=[[CLLocationManager alloc] init];
and in the dealloc, [Location release];
if your propery is retain or copy then you are over retained and the variable should be released, which looks strange... so if you want to do it in one line you would autorelease it.