[Mono-osx] __NSAutoreleasePool(): Object 0x14360f0 of class NSConcreteData autoreleased with no pool in place - just leaking
Duane Wandless
duane at wandless.net
Thu Aug 5 13:14:11 EDT 2010
Kenneth - try the sample:
http://github.com/mono/monomac/blob/master/samples/Hello/hello.cs
Duane
On Thu, Aug 5, 2010 at 1:02 PM, Kenneth (Killers Software) <
kenneth at killerssoftware.com> wrote:
> Ok I tried with and without winforms and still the same result.
>
> Kenneth
>
> On Aug 5, 2010, at 11:13 AM, Geoff Norton wrote:
>
> > Uh. NSData is in monomac. You're trying to use it in winforms. Thats
> not supported.
> >
> > -g
> >
> > On 2010-08-05, at 12:03 PM, Kenneth (Killers Software) wrote:
> >
> >> What does that have to do with NSData? The form shows just fine.
> >>
> >> Kenneth
> >>
> >> On Aug 5, 2010, at 10:47 AM, Geoff Norton wrote:
> >>
> >>> monomac is not compatible with winforms.
> >>>
> >>> -g
> >>>
> >>> On 2010-08-05, at 11:31 AM, Kenneth (Killers Software) wrote:
> >>>
> >>>>
> >>>> I get this message when I try a simple NSData data =
> NSData.FromFile(aPath); if I don't have the NSAutoReleasePool created.
> >>>>
> >>>> If I wrap the main routine code with NSAutoReleasePool just like how
> Objective-C iPhone app's main.m does it doesn't give me the error but it
> just sits there.
> >>>>
> >>>> Any ideas?
> >>>>
> >>>> using System;
> >>>> using System.Windows.Forms;
> >>>> using MonoMac.Foundation;
> >>>>
> >>>> namespace HelloWorld
> >>>> {
> >>>> public class HelloWorld
> >>>> {
> >>>> public static void Main (string[] args)
> >>>> {
> >>>> NSAutoreleasePool pool = new NSAutoreleasePool();
> >>>> Application.EnableVisualStyles();
> >>>> Application.SetCompatibleTextRenderingDefault(false);
> >>>> Application.Run(new HelloWorldForm());
> >>>> pool.Dispose();
> >>>> pool = null;
> >>>> }
> >>>> }
> >>>> }
> >>>>
> >>>> else where
> >>>>
> >>>> private void btnTest_Click(object sender, System.EventArgs e)
> >>>> {
> >>>> string fileName = txtFileName.Text;
> >>>> if (!File.Exists(fileName)) {
> >>>> MessageBox.Show(string.Format("file: {0} does not exist.",
> fileName));
> >>>> } else {
> >>>> NSData fileData = NSData.FromFile(fileName);
> >>>> MessageBox.Show(string.Format("file(length:{0}): {1}",
> fileData.Length, txtFileName.Text));
> >>>> }
> >>>> }
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Kenneth_______________________________________________
> >>>> Mono-osx mailing list
> >>>> Mono-osx at lists.ximian.com
> >>>> http://lists.ximian.com/mailman/listinfo/mono-osx
> >>>
> >>>
> >>
> >
> >
>
>
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20100805/12a23b33/attachment.html
More information about the Mono-osx
mailing list