Re: Memory Leak on UIImage resizableImageWithCapInsets
Re: Memory Leak on UIImage resizableImageWithCapInsets
- Subject: Re: Memory Leak on UIImage resizableImageWithCapInsets
- From: Sasikumar JP <email@hidden>
- Date: Sat, 04 Jan 2014 12:53:44 +0530
Hi,
Thank you for the reference.
I want to try with replacing [UIImage imageNamed:] method with [UIImage
imageWithContentsOfFile:] to check for memory leak.
As my Images are stored in Image asset(Images.xcassets). I dont know how to
read the image from image asset.
[[NSBundle mainBundle] pathForResource:@"SliderMaximum" ofType:@"png"]
returns nil.
Image Asset Name : Images.xcasset
Image Name : SliderMaximum.png / email@hidden
Thank you
Sasikumar JP
On Fri, Jan 3, 2014 at 10:49 AM, Appa Rao Mulpuri
<email@hidden>wrote:
> will helps you probably ‹
> http://stackoverflow.com/questions/14264598/instrument-and-leaks
>
> Regards,
> Apparao Mulpuri
>
>
> On 1/3/14 10:41 AM, "Sasikumar JP" <email@hidden> wrote:
>
> >Apprao,
> > I forgot to mention that this code uses ARC. so release not required.
> >
> >Thank you
> >Sasikumar JP
> >
> >Sent from my iPhone
> >
> >> On Jan 3, 2014, at 10:39 AM, Appa Rao Mulpuri
> >><email@hidden> wrote:
> >>
> >> Add [volumeView release] before making it to nil.
> >>
> >>
> >> Regards,
> >>
> >> Apparao Mulpuri
> >> Senior Systems Analyst, Mac Poker
> >> IVY Comptech Private Limited
> >> 6th Floor, Block B, Divyasree Omega,
> >> Kondapur, Hyderabad-500081.
> >> Mobile + 91 (0) 988 500 4790
> >> DD + 91 (0) 40 4472 1000 ext: 4391
> >>
> >>
> >>
> >>> On 1/3/14 10:16 AM, "Sasikumar JP" <email@hidden> wrote:
> >>>
> >>> Hi,
> >>>
> >>> I am using the following code to create Custom VolumeSlider. Is there
> >>> anything wrong with this implementation.
> >>>
> >>> Instruments identifies the memory leak "resizableImageWithCapInsets"
> >>>call.
> >>>
> >>> MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame:self.
> >>> volumeSliderView.bounds];
> >>>
> >>> [volumeView setMaximumVolumeSliderImage:[[UIImage imageNamed:
> >>> @"SliderMaximum"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0,
> >>> 10)]
> >>> forState:UIControlStateNormal];
> >>>
> >>> [volumeView setMinimumVolumeSliderImage:[[UIImage imageNamed:
> >>> @"SliderMinimum"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 10,
> >>>0,
> >>> 0)]
> >>> forState:UIControlStateNormal];
> >>>
> >>> [volumeView setRouteButtonImage:[UIImage imageNamed:@"Airplay"]
> >>> forState
> >>> :UIControlStateNormal];
> >>>
> >>> [volumeView setVolumeThumbImage:[UIImage imageNamed:@"VolumeThumb"]
> >>> forState:UIControlStateNormal];
> >>>
> >>> [self.volumeSliderView addSubview:volumeView];
> >>>
> >>> volumeView = nil;
> >>>
> >>> Any help is highly appreciated.
> >>>
> >>>
> >>> Thank you
> >>>
> >>> Sasikumar JP
> >>> _______________________________________________
> >>>
> >>> Cocoa-dev mailing list (email@hidden)
> >>>
> >>> 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:
> >>>
> >>>
> >>>.c
> >>> om
> >>>
> >>> This email sent to email@hidden
> >>
> >> This email and any attachments are confidential, and may be legally
> >>privileged and protected by copyright. If you are not the intended
> >>recipient dissemination or copying of this email is prohibited. If you
> >>have received this in error, please notify the sender by replying by
> >>email and then delete the email completely from your system. Any views
> >>or opinions are solely those of the sender. This communication is not
> >>intended to form a binding contract unless expressly indicated to the
> >>contrary and properly authorised. Any actions taken on the basis of this
> >>email are at the recipient's own risk.
>
> This email and any attachments are confidential, and may be legally
> privileged and protected by copyright. If you are not the intended
> recipient dissemination or copying of this email is prohibited. If you have
> received this in error, please notify the sender by replying by email and
> then delete the email completely from your system. Any views or opinions
> are solely those of the sender. This communication is not intended to form
> a binding contract unless expressly indicated to the contrary and properly
> authorised. Any actions taken on the basis of this email are at the
> recipient's own risk.
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden