~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/maccore/src/Foundation/NSAutoreleasePool.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
2
// Copyright 2009-2010, Novell, Inc.
 
3
// Copyright 2011, 2012 Xamarin Inc
3
4
//
4
5
// Permission is hereby granted, free of charge, to any person obtaining
5
6
// a copy of this software and associated documentation files (the
28
29
using MonoMac.ObjCRuntime;
29
30
 
30
31
namespace MonoMac.Foundation {
31
 
        [Register ("NSAutoreleasePool")]
 
32
        [Register ("NSAutoreleasePool", true)]
32
33
        public class NSAutoreleasePool : NSObject, IDisposable {
33
 
                static IntPtr class_ptr = Class.GetHandle ("NSAutoreleasePool");
34
 
 
35
 
                public override IntPtr ClassHandle { get { return class_ptr; } }
 
34
                public override IntPtr ClassHandle { get { return Class.GetHandle ("NSAutoreleasePool"); } }
36
35
 
37
36
                [Export ("init")]
38
37
                public NSAutoreleasePool () : base (NSObjectFlag.Empty)
39
38
                {
40
39
                        if (IsDirectBinding) {
41
 
                                Handle = Messaging.intptr_objc_msgSend (this.Handle, Selector.Init);
 
40
                                Handle = Messaging.intptr_objc_msgSend (this.Handle, Selector.GetHandle ("init"));
42
41
                        } else {
43
 
                                Handle = Messaging.intptr_objc_msgSendSuper (this.SuperHandle, Selector.Init);
 
42
                                Handle = Messaging.intptr_objc_msgSendSuper (this.SuperHandle, Selector.GetHandle ("init"));
44
43
                        }
45
44
                }
46
45