• 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
"Live" image preview, huge memory usage...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"Live" image preview, huge memory usage...


  • Subject: "Live" image preview, huge memory usage...
  • From: Jean-Nicolas Jolivet <email@hidden>
  • Date: Tue, 02 Dec 2008 18:29:35 -0500

(This is linked to my last post on the list, however it's a completely different topic so I posted it separately)
To sum it up, my app allows to do some basic modifications to an image (brightness/contrast/saturation among others).... those are applied via CIFilters, the app also allows to re-size images...Right now I'm trying to work exclusively with BitmapImageRep since it seems to be faster than using NSImage...


I display a "live" preview of the image (I say "live" because basically all my sliders (to control brightness etc.) do not send continuously but only once the mouse released them)... anyway the way I got it working right now is like this:

I have an NSBitmapImageRep called "previewImage"... this contains the preview image and it gets updated everytime the brightness/contrast/ saturation sliders are released...

in my preview window, I have an NSImageView.. I bound the data of this image view to the "previewImageData" key of my controller which basically only does this:

return [previewImage TIFFRepresentation];


Now, all this is working well, however, I see HUGE ram increases every time I move a slider.. (it gets in the 100+ mb very fast)...and it never seems to drop... I tried to set my sliders to continuous for fun, it gets at about 200mb of ram in a matter of seconds...


I ran Instruments and MallocDebug, apparently I have no leaks (the only leaks I have are NSPathStore which I am not creating)...

Is anything wrong with the way Im doing it? Why the huge ram increases that never drops? If there was an obvious leak I guess Instrument or MallocDebug would've catch it?

(also, it might have nothing to do with this but the preview image is generated in an NSOperation.. I'm mentioning it since I know that threads usually have their own autorelease pool... Im not sure how it is with NSOperations...)

Jean-Nicolas Jolivet
email@hidden
http://www.silverscripting.com

_______________________________________________

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


  • Follow-Ups:
    • Re: "Live" image preview, huge memory usage...
      • From: glenn andreas <email@hidden>
  • Prev by Date: Button title irregularities
  • Next by Date: Re: "Live" image preview, huge memory usage...
  • Previous by thread: Re: Button title irregularities
  • Next by thread: Re: "Live" image preview, huge memory usage...
  • Index(es):
    • Date
    • Thread