[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 13:02:54 EDT 2010


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
>>> 
>>> 
>> 
> 
> 

-------------- 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/ee4e4f30/attachment-0001.bin 


More information about the Mono-osx mailing list