[Mono-osx] __NSAutoreleasePool(): Object 0x14360f0 of class NSConcreteData autoreleased with no pool in place - just leaking
Kenneth (Killers Software)
kenneth at killerssoftware.com
Thu Aug 5 16:16:07 EDT 2010
Thanks Duane, I was able to use NSData in that app. Is there a way to make a solution in MonoDevelop for this sample Hello app so that we could run it from there instead of running the make from the command line and then double clicking on Hello.app? Also, I noticed for the NSTextField in that app I couldn't click into it.
Kenneth
On Aug 5, 2010, at 12:14 PM, Duane Wandless wrote:
> 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/c0335636/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1966 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-osx/attachments/20100805/c0335636/attachment-0001.bin
More information about the Mono-osx
mailing list