Hi,

I've tried with your big image, and memory usage goes up and down but I
can't find any significant leaks with an iPad 3, in fact I've successfully
created over 500 images.

What I do see though is that iOS keeps the current image around for a while
(to render it I presume), so if your intent is to show the images to the
user I recommend resizing them to the size you're going to present them to
the user (so the image iOS keeps in memory is smaller).

Here is my entire ImageViewController.cs:
https://gist.github.com/b00c96938d4a998d7b3d

If it still crashes for you, I suggest you try using Instruments to see
where the memory is used. Here is how it looks for me:
http://screencast.com/t/y06hQTKmHe - in particular look at the saw-like
graph, memory usage goes up and down, but over time it doesn't increase.

Rolf

On Thu, Sep 13, 2012 at 6:08 PM, couchworx <[email protected]> wrote:

> Hi Rolf,
>
> thanks for the code example.
>
> tried the new code on two devices, a 4S and a 3GS, both on iOS 5.1.1
> (9B206):
>
> freshly reset 4S: 50 calls to crash
> after the first crash on 4S: 11 calls to crash consistently
>
> freshly reset 3GS: first call crashes with this message
> Unable to render using GPU - falling back to CPU!
> Native stacktrace:
>         0   ColorControl                        0x001d1b0c
> mono_handle_native_sigsegv + 280
>         1   ColorControl                        0x001bb690
> mono_sigsegv_signal_handler + 196
>         2   libsystem_c.dylib                   0x34dbd7ed _sigtramp + 48
>         3   ???                                 0x00000708 0x0 + 1800
>         4   ImageIO                             0x36525623
> __copyImageBlockSetPNG_block_invoke_1 + 614
>         5   libdispatch.dylib                   0x354e6c59
> _dispatch_call_block_and_release + 12
>         6   libdispatch.dylib                   0x354f27bb
> _dispatch_worker_thread2
> + 262
>         7   libsystem_c.dylib                   0x34d6edfb
> _pthread_wqthread + 294
>         8   libsystem_c.dylib                   0x34d6ecd0 start_wqthread
> + 8
>
> so, unfortunately, the changed code has gained some 'space' but could not
> hinder the outcome much ... ;/
> I've tried to attached one of the pics I'm using ... just so you know I'm
> not using something overly 'crazy' ... but 6.4MB is to large to be posted
> here ... ;-)
>
> best
> boris
>
>
>
> --
> View this message in context:
> http://monotouch.2284126.n4.nabble.com/CoreImage-Memory-Consumption-Recipe-affected-tp4656953p4657018.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to