[MonoTouch] SIGSEGV while executing native code
Rolf Bjarne Kvinge
rolf at xamarin.com
Fri Oct 7 07:32:20 EDT 2011
Hi,
The problem is this line:
var button = new UIBarButtonItem {..
When the method finishes executing, there is no reference to this button in
managed code, so the GC determines that it can collect it. You need to
ensure the button stays alive as long as necessary (usually done by using a
class-level variable instead of a method variable)..
Rolf
On Fri, Oct 7, 2011 at 1:11 PM, steott at gmail.com <steott at gmail.com> wrote:
> Hi Guido, if you just try to remove the using block for the alert?
> I had the same problem and it was solved in this way.
>
> --
> View this message in context:
> http://monotouch.2284126.n4.nabble.com/SIGSEGV-while-executing-native-code-tp3881741p3881780.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monotouch/attachments/20111007/06c2b956/attachment.html
More information about the MonoTouch
mailing list