[MonoTouch] MonoTouch unexpected behaviors (with native FB lib)

2011-09-08 Thread vinkaga
I am experiencing strange behavior working with native FB library. My observations are below. I am using the code located at https://github.com/kevinmcmahon/monotouch-facebook but I don't believe the issues are related to the code. It seems they are related to MonoTouch or my lack of understanding

Re: [MonoTouch] MonoTouch unexpected behaviors (with native FB lib)

2011-09-08 Thread Jeff Stedfast
Hi Vinkage, The problem is that your SessionDelegate is being GC'd. You need to keep a reference to it around until it is no longer needed. The easy fix is to declare it at as a member of your class. The second error is basically MonoTouch trying to create a new SessionDelegate object for the Int

Re: [MonoTouch] MonoTouch unexpected behaviors (with native FB lib)

2011-09-08 Thread vinkaga
Thanks Jeff, it does clarify. Am I correct in assuming that since FB lib is native, the reference passed to it (e.g. sessionDelegate) is not counted for GC use count and therefore are GCed? -- View this message in context: http://monotouch.2284126.n4.nabble.com/MonoTouch-unexpected-behaviors-with

Re: [MonoTouch] MonoTouch unexpected behaviors (with native FB lib)

2011-09-08 Thread Jeff Stedfast
On Thu, Sep 8, 2011 at 1:35 PM, vinkaga wrote: > Thanks Jeff, it does clarify. Am I correct in assuming that since FB lib is > native, the reference passed to it (e.g. sessionDelegate) is not counted > for > GC use count and therefore are GCed? > Correct. Mono's GC is not able to detect that nat

Re: [MonoTouch] MonoTouch unexpected behaviors (with native FB lib)

2011-09-08 Thread vinkaga
Thanks Jeff. I am sure knowing this will save me a lot of heartache. I guess I didn't read the FAQs properly :-) -- View this message in context: http://monotouch.2284126.n4.nabble.com/MonoTouch-unexpected-behaviors-with-native-FB-lib-tp3799298p3799506.html Sent from the MonoTouch mailing list ar

Re: [MonoTouch] MonoTouch unexpected behaviors (with native FB lib)

2011-09-08 Thread Jeff Stedfast
No problem... it's one of those things that we likely all stumble on at some point or another ;-) Jeff On Thu, Sep 8, 2011 at 1:42 PM, vinkaga wrote: > Thanks Jeff. I am sure knowing this will save me a lot of heartache. I > guess > I didn't read the FAQs properly :-) > > -- > View this message