On 09.11.2011 00:01, sisnaz wrote:
> I really could use some help with this one. I keep seeing this message for
> each property in my class:
> "the requested operation cannot be completed because the object has been
> garbage collected."
Where do you see this message? While debugging?
> In my web service:
Web service? Do you mean web service *client*?
> StreamReader results = new StreamReader(answer);
> string peopleData = results.ReadToEnd();
>
> // everything is fine until I get here, once it's serialized from Json, I
> have 9 records with null properties.
> List<PeopleModel> people =
> DataHelper.SerializeFromJson<List<PeopleModel>>(peopleData);
What does DataHelper.SerializeFromJson? Are you sure that it's
deserializing correctly?
>
> The Model:
> [Serializable]
> public class PeopleModel {
> Just thought of something while typing all this in, I have other methods in
> my web service returning similar list of models, the only difference is this
> I recently decorated with [Serializable] because I wanted to persist it to a
> binary file after retrieval from the web service. Could that be making the
> GC want to collect it prematurely?
Not really, but did you remove it to see if it's the cause
of the problem?
Robert
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch