• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: initWithHTML Memory leak
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: initWithHTML Memory leak


  • Subject: Re: initWithHTML Memory leak
  • From: "Clint Shryock" <email@hidden>
  • Date: Tue, 8 May 2007 06:33:21 -0500

i would recommend using mallocdebug for watching memory.  it will give you a
better idea how your application is using memory than activity monitor

+Clint

On 5/5/07, Alessandro Barile <email@hidden> wrote:


On 05/mag/07, at 06:19, Graham Perks wrote:

>
> On May 2, 2007, at 1:31 PM, Alessandro Barile wrote:
>
>> NSMutableAttributedString* attributedInfoString =
>> [[NSMutableAttributedString alloc] initWithHTML:[ pHtml
>> dataUsingEncoding: NSUnicodeStringEncoding ] documentAttributes:nil];
>> [ attributedInfoString release ];
>>
>> where pHtml is NSString initializied with html tag code.
>>
>> If you execute only this code, you can see that
>> "attributedInfoString" never releases the memory.
>
> What memory are you expecting it to release? How are you able to
> tell it is not releasing memory?
>
> Graham. Perks.

Hi,

thanks for intesting to my problem...

> How are you able to tell it is not releasing memory?

because i'm monitoring with Activity Monitor my Application.
When log this step before and after this code i can see that
"attributedInfoString" alloc for example 1Mb or more ( this depends
on what pHtml contains), but when the release command for
"attributedInfoString" is called is not releasing the memory.
Obviously, if you call many times these two pieces of code, the
memory increases to the infinite.
Meantime i have found an other person with same problem and no solution:
http://www.cocoabuilder.com/archive/message/cocoa/2006/11/24/174959

Thank you so much.
Ale
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >(no subject) (From: Alessandro Barile <email@hidden>)
 >Re: (no subject) (From: Graham Perks <email@hidden>)
 >Re: initWithHTML Memory leak (From: Alessandro Barile <email@hidden>)

  • Prev by Date: How to convert pixels to centimeters in Cocoa
  • Next by Date: Optimizing Core Data for large time series
  • Previous by thread: Re: initWithHTML Memory leak
  • Next by thread: (no subject)
  • Index(es):
    • Date
    • Thread