diff --git a/src/Core/Parser/ASTConverter.cs b/src/Core/Parser/ASTConverter.cs index 65a62cd1..281b7447 100644 --- a/src/Core/Parser/ASTConverter.cs +++ b/src/Core/Parser/ASTConverter.cs @@ -36,77 +36,77 @@ namespace CppSharp { case TypeKind.Tag: { - var _type = TagType.__CreateInstance(type.__Instance, true); + var _type = TagType.__CreateInstance(type.__Instance); return VisitTag(_type); } case TypeKind.Array: { - var _type = ArrayType.__CreateInstance(type.__Instance, true); + var _type = ArrayType.__CreateInstance(type.__Instance); return VisitArray(_type); } case TypeKind.Function: { - var _type = FunctionType.__CreateInstance(type.__Instance, true); + var _type = FunctionType.__CreateInstance(type.__Instance); return VisitFunction(_type); } case TypeKind.Pointer: { - var _type = PointerType.__CreateInstance(type.__Instance, true); + var _type = PointerType.__CreateInstance(type.__Instance); return VisitPointer(_type); } case TypeKind.MemberPointer: { - var _type = MemberPointerType.__CreateInstance(type.__Instance, true); + var _type = MemberPointerType.__CreateInstance(type.__Instance); return VisitMemberPointer(_type); } case TypeKind.Typedef: { - var _type = TypedefType.__CreateInstance(type.__Instance, true); + var _type = TypedefType.__CreateInstance(type.__Instance); return VisitTypedef(_type); } case TypeKind.Attributed: { - var _type = AttributedType.__CreateInstance(type.__Instance, true); + var _type = AttributedType.__CreateInstance(type.__Instance); return VisitAttributed(_type); } case TypeKind.Decayed: { - var _type = DecayedType.__CreateInstance(type.__Instance, true); + var _type = DecayedType.__CreateInstance(type.__Instance); return VisitDecayed(_type); } case TypeKind.TemplateSpecialization: { - var _type = TemplateSpecializationType.__CreateInstance(type.__Instance, true); + var _type = TemplateSpecializationType.__CreateInstance(type.__Instance); return VisitTemplateSpecialization(_type); } case TypeKind.TemplateParameter: { - var _type = TemplateParameterType.__CreateInstance(type.__Instance, true); + var _type = TemplateParameterType.__CreateInstance(type.__Instance); return VisitTemplateParameter(_type); } case TypeKind.TemplateParameterSubstitution: { - var _type = TemplateParameterSubstitutionType.__CreateInstance(type.__Instance, true); + var _type = TemplateParameterSubstitutionType.__CreateInstance(type.__Instance); return VisitTemplateParameterSubstitution(_type); } case TypeKind.InjectedClassName: { - var _type = InjectedClassNameType.__CreateInstance(type.__Instance, true); + var _type = InjectedClassNameType.__CreateInstance(type.__Instance); return VisitInjectedClassName(_type); } case TypeKind.DependentName: { - var _type = DependentNameType.__CreateInstance(type.__Instance, true); + var _type = DependentNameType.__CreateInstance(type.__Instance); return VisitDependentName(_type); } case TypeKind.Builtin: { - var _type = BuiltinType.__CreateInstance(type.__Instance, true); + var _type = BuiltinType.__CreateInstance(type.__Instance); return VisitBuiltin(_type); } case TypeKind.PackExpansion: { - var _type = PackExpansionType.__CreateInstance(type.__Instance, true); + var _type = PackExpansionType.__CreateInstance(type.__Instance); return VisitPackExpansion(_type); } } @@ -148,97 +148,97 @@ namespace CppSharp { case DeclarationKind.TranslationUnit: { - var _decl = TranslationUnit.__CreateInstance(decl.__Instance, true); + var _decl = TranslationUnit.__CreateInstance(decl.__Instance); return VisitTranslationUnit(_decl); } case DeclarationKind.Namespace: { - var _decl = Namespace.__CreateInstance(decl.__Instance, true); + var _decl = Namespace.__CreateInstance(decl.__Instance); return VisitNamespace(_decl); } case DeclarationKind.Typedef: { - var _decl = TypedefDecl.__CreateInstance(decl.__Instance, true); + var _decl = TypedefDecl.__CreateInstance(decl.__Instance); return VisitTypedef(_decl); } case DeclarationKind.Parameter: { - var _decl = Parameter.__CreateInstance(decl.__Instance, true); + var _decl = Parameter.__CreateInstance(decl.__Instance); return VisitParameter(_decl); } case DeclarationKind.Function: { - var _decl = Function.__CreateInstance(decl.__Instance, true); + var _decl = Function.__CreateInstance(decl.__Instance); return VisitFunction(_decl); } case DeclarationKind.Method: { - var _decl = Method.__CreateInstance(decl.__Instance, true); + var _decl = Method.__CreateInstance(decl.__Instance); return VisitMethod(_decl); } case DeclarationKind.Enumeration: { - var _decl = Enumeration.__CreateInstance(decl.__Instance, true); + var _decl = Enumeration.__CreateInstance(decl.__Instance); return VisitEnumeration(_decl); } case DeclarationKind.EnumerationItem: { - var _decl = Enumeration.Item.__CreateInstance(decl.__Instance, true); + var _decl = Enumeration.Item.__CreateInstance(decl.__Instance); return VisitEnumerationItem(_decl); } case DeclarationKind.Variable: { - var _decl = Variable.__CreateInstance(decl.__Instance, true); + var _decl = Variable.__CreateInstance(decl.__Instance); return VisitVariable(_decl); } case DeclarationKind.Friend: { - var _decl = Friend.__CreateInstance(decl.__Instance, true); + var _decl = Friend.__CreateInstance(decl.__Instance); return VisitFriend(_decl); } case DeclarationKind.Field: { - var _decl = Field.__CreateInstance(decl.__Instance, true); + var _decl = Field.__CreateInstance(decl.__Instance); return VisitField(_decl); } case DeclarationKind.AccessSpecifier: { - var _decl = AccessSpecifierDecl.__CreateInstance(decl.__Instance, true); + var _decl = AccessSpecifierDecl.__CreateInstance(decl.__Instance); return VisitAccessSpecifier(_decl); } case DeclarationKind.Class: { - var _decl = Class.__CreateInstance(decl.__Instance, true); + var _decl = Class.__CreateInstance(decl.__Instance); return VisitClass(_decl); } case DeclarationKind.ClassTemplate: { - var _decl = ClassTemplate.__CreateInstance(decl.__Instance, true); + var _decl = ClassTemplate.__CreateInstance(decl.__Instance); return VisitClassTemplate(_decl); } case DeclarationKind.ClassTemplateSpecialization: { - var _decl = ClassTemplateSpecialization.__CreateInstance(decl.__Instance, true); + var _decl = ClassTemplateSpecialization.__CreateInstance(decl.__Instance); return VisitClassTemplateSpecialization(_decl); } case DeclarationKind.ClassTemplatePartialSpecialization: { - var _decl = ClassTemplatePartialSpecialization.__CreateInstance(decl.__Instance, true); + var _decl = ClassTemplatePartialSpecialization.__CreateInstance(decl.__Instance); return VisitClassTemplatePartialSpecialization(_decl); } case DeclarationKind.FunctionTemplate: { - var _decl = FunctionTemplate.__CreateInstance(decl.__Instance, true); + var _decl = FunctionTemplate.__CreateInstance(decl.__Instance); return VisitFunctionTemplate(_decl); } case DeclarationKind.MacroDefinition: { - var _decl = MacroDefinition.__CreateInstance(decl.__Instance, true); + var _decl = MacroDefinition.__CreateInstance(decl.__Instance); return VisitMacroDefinition(_decl); } case DeclarationKind.MacroExpansion: { - var _decl = MacroExpansion.__CreateInstance(decl.__Instance, true); + var _decl = MacroExpansion.__CreateInstance(decl.__Instance); return VisitMacroExpansion(_decl); } } @@ -1372,8 +1372,6 @@ namespace CppSharp _layout.Components.Add(_component); } - NativeObjects.Add(layout); - return _layout; } diff --git a/src/CppParser/Bindings/CLI/AST.cpp b/src/CppParser/Bindings/CLI/AST.cpp index 1295f549..abc3539d 100644 --- a/src/CppParser/Bindings/CLI/AST.cpp +++ b/src/CppParser/Bindings/CLI/AST.cpp @@ -11,20 +11,12 @@ CppSharp::Parser::AST::Type::Type(::CppSharp::CppParser::AST::Type* native) CppSharp::Parser::AST::Type^ CppSharp::Parser::AST::Type::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::Type::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::Type^ CppSharp::Parser::AST::Type::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::Type^ result = gcnew ::CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*) native.ToPointer()); } CppSharp::Parser::AST::Type::~Type() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::Type::Type(CppSharp::Parser::AST::TypeKind kind) @@ -81,20 +73,12 @@ CppSharp::Parser::AST::TypeQualifiers::TypeQualifiers(::CppSharp::CppParser::AST CppSharp::Parser::AST::TypeQualifiers^ CppSharp::Parser::AST::TypeQualifiers::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::TypeQualifiers::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::TypeQualifiers^ CppSharp::Parser::AST::TypeQualifiers::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::TypeQualifiers^ result = gcnew ::CppSharp::Parser::AST::TypeQualifiers((::CppSharp::CppParser::AST::TypeQualifiers*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::TypeQualifiers((::CppSharp::CppParser::AST::TypeQualifiers*) native.ToPointer()); } CppSharp::Parser::AST::TypeQualifiers::~TypeQualifiers() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::TypeQualifiers::TypeQualifiers(CppSharp::Parser::AST::TypeQualifiers^ _0) @@ -160,20 +144,12 @@ CppSharp::Parser::AST::QualifiedType::QualifiedType(::CppSharp::CppParser::AST:: CppSharp::Parser::AST::QualifiedType^ CppSharp::Parser::AST::QualifiedType::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::QualifiedType::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::QualifiedType^ CppSharp::Parser::AST::QualifiedType::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::QualifiedType^ result = gcnew ::CppSharp::Parser::AST::QualifiedType((::CppSharp::CppParser::AST::QualifiedType*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::QualifiedType((::CppSharp::CppParser::AST::QualifiedType*) native.ToPointer()); } CppSharp::Parser::AST::QualifiedType::~QualifiedType() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::QualifiedType::QualifiedType() @@ -228,14 +204,7 @@ CppSharp::Parser::AST::TagType::TagType(::CppSharp::CppParser::AST::TagType* nat CppSharp::Parser::AST::TagType^ CppSharp::Parser::AST::TagType::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::TagType::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::TagType^ CppSharp::Parser::AST::TagType::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::TagType^ result = gcnew ::CppSharp::Parser::AST::TagType((::CppSharp::CppParser::AST::TagType*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::TagType((::CppSharp::CppParser::AST::TagType*) native.ToPointer()); } CppSharp::Parser::AST::TagType::~TagType() @@ -276,14 +245,7 @@ CppSharp::Parser::AST::ArrayType::ArrayType(::CppSharp::CppParser::AST::ArrayTyp CppSharp::Parser::AST::ArrayType^ CppSharp::Parser::AST::ArrayType::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::ArrayType::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::ArrayType^ CppSharp::Parser::AST::ArrayType::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::ArrayType^ result = gcnew ::CppSharp::Parser::AST::ArrayType((::CppSharp::CppParser::AST::ArrayType*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::ArrayType((::CppSharp::CppParser::AST::ArrayType*) native.ToPointer()); } CppSharp::Parser::AST::ArrayType::~ArrayType() @@ -354,14 +316,7 @@ CppSharp::Parser::AST::FunctionType::FunctionType(::CppSharp::CppParser::AST::Fu CppSharp::Parser::AST::FunctionType^ CppSharp::Parser::AST::FunctionType::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::FunctionType::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::FunctionType^ CppSharp::Parser::AST::FunctionType::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::FunctionType^ result = gcnew ::CppSharp::Parser::AST::FunctionType((::CppSharp::CppParser::AST::FunctionType*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::FunctionType((::CppSharp::CppParser::AST::FunctionType*) native.ToPointer()); } CppSharp::Parser::AST::FunctionType::~FunctionType() @@ -438,14 +393,7 @@ CppSharp::Parser::AST::PointerType::PointerType(::CppSharp::CppParser::AST::Poin CppSharp::Parser::AST::PointerType^ CppSharp::Parser::AST::PointerType::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::PointerType::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::PointerType^ CppSharp::Parser::AST::PointerType::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::PointerType^ result = gcnew ::CppSharp::Parser::AST::PointerType((::CppSharp::CppParser::AST::PointerType*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::PointerType((::CppSharp::CppParser::AST::PointerType*) native.ToPointer()); } CppSharp::Parser::AST::PointerType::~PointerType() @@ -496,14 +444,7 @@ CppSharp::Parser::AST::MemberPointerType::MemberPointerType(::CppSharp::CppParse CppSharp::Parser::AST::MemberPointerType^ CppSharp::Parser::AST::MemberPointerType::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::MemberPointerType::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::MemberPointerType^ CppSharp::Parser::AST::MemberPointerType::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::MemberPointerType^ result = gcnew ::CppSharp::Parser::AST::MemberPointerType((::CppSharp::CppParser::AST::MemberPointerType*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::MemberPointerType((::CppSharp::CppParser::AST::MemberPointerType*) native.ToPointer()); } CppSharp::Parser::AST::MemberPointerType::~MemberPointerType() @@ -544,14 +485,7 @@ CppSharp::Parser::AST::TypedefType::TypedefType(::CppSharp::CppParser::AST::Type CppSharp::Parser::AST::TypedefType^ CppSharp::Parser::AST::TypedefType::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::TypedefType::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::TypedefType^ CppSharp::Parser::AST::TypedefType::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::TypedefType^ result = gcnew ::CppSharp::Parser::AST::TypedefType((::CppSharp::CppParser::AST::TypedefType*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::TypedefType((::CppSharp::CppParser::AST::TypedefType*) native.ToPointer()); } CppSharp::Parser::AST::TypedefType::~TypedefType() @@ -592,14 +526,7 @@ CppSharp::Parser::AST::AttributedType::AttributedType(::CppSharp::CppParser::AST CppSharp::Parser::AST::AttributedType^ CppSharp::Parser::AST::AttributedType::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::AttributedType::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::AttributedType^ CppSharp::Parser::AST::AttributedType::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::AttributedType^ result = gcnew ::CppSharp::Parser::AST::AttributedType((::CppSharp::CppParser::AST::AttributedType*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::AttributedType((::CppSharp::CppParser::AST::AttributedType*) native.ToPointer()); } CppSharp::Parser::AST::AttributedType::~AttributedType() @@ -650,14 +577,7 @@ CppSharp::Parser::AST::DecayedType::DecayedType(::CppSharp::CppParser::AST::Deca CppSharp::Parser::AST::DecayedType^ CppSharp::Parser::AST::DecayedType::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::DecayedType::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::DecayedType^ CppSharp::Parser::AST::DecayedType::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::DecayedType^ result = gcnew ::CppSharp::Parser::AST::DecayedType((::CppSharp::CppParser::AST::DecayedType*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::DecayedType((::CppSharp::CppParser::AST::DecayedType*) native.ToPointer()); } CppSharp::Parser::AST::DecayedType::~DecayedType() @@ -719,20 +639,12 @@ CppSharp::Parser::AST::TemplateArgument::TemplateArgument(::CppSharp::CppParser: CppSharp::Parser::AST::TemplateArgument^ CppSharp::Parser::AST::TemplateArgument::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::TemplateArgument::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::TemplateArgument^ CppSharp::Parser::AST::TemplateArgument::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::TemplateArgument^ result = gcnew ::CppSharp::Parser::AST::TemplateArgument((::CppSharp::CppParser::AST::TemplateArgument*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::TemplateArgument((::CppSharp::CppParser::AST::TemplateArgument*) native.ToPointer()); } CppSharp::Parser::AST::TemplateArgument::~TemplateArgument() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::TemplateArgument::TemplateArgument() @@ -807,14 +719,7 @@ CppSharp::Parser::AST::TemplateSpecializationType::TemplateSpecializationType(:: CppSharp::Parser::AST::TemplateSpecializationType^ CppSharp::Parser::AST::TemplateSpecializationType::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::TemplateSpecializationType::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::TemplateSpecializationType^ CppSharp::Parser::AST::TemplateSpecializationType::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::TemplateSpecializationType^ result = gcnew ::CppSharp::Parser::AST::TemplateSpecializationType((::CppSharp::CppParser::AST::TemplateSpecializationType*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::TemplateSpecializationType((::CppSharp::CppParser::AST::TemplateSpecializationType*) native.ToPointer()); } CppSharp::Parser::AST::TemplateSpecializationType::~TemplateSpecializationType() @@ -892,20 +797,12 @@ CppSharp::Parser::AST::TemplateParameter::TemplateParameter(::CppSharp::CppParse CppSharp::Parser::AST::TemplateParameter^ CppSharp::Parser::AST::TemplateParameter::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::TemplateParameter::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::TemplateParameter^ CppSharp::Parser::AST::TemplateParameter::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::TemplateParameter^ result = gcnew ::CppSharp::Parser::AST::TemplateParameter((::CppSharp::CppParser::AST::TemplateParameter*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::TemplateParameter((::CppSharp::CppParser::AST::TemplateParameter*) native.ToPointer()); } CppSharp::Parser::AST::TemplateParameter::~TemplateParameter() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::TemplateParameter::TemplateParameter() @@ -981,14 +878,7 @@ CppSharp::Parser::AST::TemplateParameterType::TemplateParameterType(::CppSharp:: CppSharp::Parser::AST::TemplateParameterType^ CppSharp::Parser::AST::TemplateParameterType::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::TemplateParameterType::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::TemplateParameterType^ CppSharp::Parser::AST::TemplateParameterType::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::TemplateParameterType^ result = gcnew ::CppSharp::Parser::AST::TemplateParameterType((::CppSharp::CppParser::AST::TemplateParameterType*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::TemplateParameterType((::CppSharp::CppParser::AST::TemplateParameterType*) native.ToPointer()); } CppSharp::Parser::AST::TemplateParameterType::~TemplateParameterType() @@ -1059,14 +949,7 @@ CppSharp::Parser::AST::TemplateParameterSubstitutionType::TemplateParameterSubst CppSharp::Parser::AST::TemplateParameterSubstitutionType^ CppSharp::Parser::AST::TemplateParameterSubstitutionType::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::TemplateParameterSubstitutionType::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::TemplateParameterSubstitutionType^ CppSharp::Parser::AST::TemplateParameterSubstitutionType::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::TemplateParameterSubstitutionType^ result = gcnew ::CppSharp::Parser::AST::TemplateParameterSubstitutionType((::CppSharp::CppParser::AST::TemplateParameterSubstitutionType*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::TemplateParameterSubstitutionType((::CppSharp::CppParser::AST::TemplateParameterSubstitutionType*) native.ToPointer()); } CppSharp::Parser::AST::TemplateParameterSubstitutionType::~TemplateParameterSubstitutionType() @@ -1107,14 +990,7 @@ CppSharp::Parser::AST::InjectedClassNameType::InjectedClassNameType(::CppSharp:: CppSharp::Parser::AST::InjectedClassNameType^ CppSharp::Parser::AST::InjectedClassNameType::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::InjectedClassNameType::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::InjectedClassNameType^ CppSharp::Parser::AST::InjectedClassNameType::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::InjectedClassNameType^ result = gcnew ::CppSharp::Parser::AST::InjectedClassNameType((::CppSharp::CppParser::AST::InjectedClassNameType*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::InjectedClassNameType((::CppSharp::CppParser::AST::InjectedClassNameType*) native.ToPointer()); } CppSharp::Parser::AST::InjectedClassNameType::~InjectedClassNameType() @@ -1165,14 +1041,7 @@ CppSharp::Parser::AST::DependentNameType::DependentNameType(::CppSharp::CppParse CppSharp::Parser::AST::DependentNameType^ CppSharp::Parser::AST::DependentNameType::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::DependentNameType::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::DependentNameType^ CppSharp::Parser::AST::DependentNameType::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::DependentNameType^ result = gcnew ::CppSharp::Parser::AST::DependentNameType((::CppSharp::CppParser::AST::DependentNameType*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::DependentNameType((::CppSharp::CppParser::AST::DependentNameType*) native.ToPointer()); } CppSharp::Parser::AST::DependentNameType::~DependentNameType() @@ -1203,14 +1072,7 @@ CppSharp::Parser::AST::PackExpansionType::PackExpansionType(::CppSharp::CppParse CppSharp::Parser::AST::PackExpansionType^ CppSharp::Parser::AST::PackExpansionType::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::PackExpansionType::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::PackExpansionType^ CppSharp::Parser::AST::PackExpansionType::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::PackExpansionType^ result = gcnew ::CppSharp::Parser::AST::PackExpansionType((::CppSharp::CppParser::AST::PackExpansionType*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::PackExpansionType((::CppSharp::CppParser::AST::PackExpansionType*) native.ToPointer()); } CppSharp::Parser::AST::PackExpansionType::~PackExpansionType() @@ -1241,14 +1103,7 @@ CppSharp::Parser::AST::BuiltinType::BuiltinType(::CppSharp::CppParser::AST::Buil CppSharp::Parser::AST::BuiltinType^ CppSharp::Parser::AST::BuiltinType::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::BuiltinType::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::BuiltinType^ CppSharp::Parser::AST::BuiltinType::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::BuiltinType^ result = gcnew ::CppSharp::Parser::AST::BuiltinType((::CppSharp::CppParser::AST::BuiltinType*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::BuiltinType((::CppSharp::CppParser::AST::BuiltinType*) native.ToPointer()); } CppSharp::Parser::AST::BuiltinType::~BuiltinType() @@ -1290,20 +1145,12 @@ CppSharp::Parser::AST::VTableComponent::VTableComponent(::CppSharp::CppParser::A CppSharp::Parser::AST::VTableComponent^ CppSharp::Parser::AST::VTableComponent::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::VTableComponent::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::VTableComponent^ CppSharp::Parser::AST::VTableComponent::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::VTableComponent^ result = gcnew ::CppSharp::Parser::AST::VTableComponent((::CppSharp::CppParser::AST::VTableComponent*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::VTableComponent((::CppSharp::CppParser::AST::VTableComponent*) native.ToPointer()); } CppSharp::Parser::AST::VTableComponent::~VTableComponent() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::VTableComponent::VTableComponent() @@ -1369,20 +1216,12 @@ CppSharp::Parser::AST::VTableLayout::VTableLayout(::CppSharp::CppParser::AST::VT CppSharp::Parser::AST::VTableLayout^ CppSharp::Parser::AST::VTableLayout::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::VTableLayout::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::VTableLayout^ CppSharp::Parser::AST::VTableLayout::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::VTableLayout^ result = gcnew ::CppSharp::Parser::AST::VTableLayout((::CppSharp::CppParser::AST::VTableLayout*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::VTableLayout((::CppSharp::CppParser::AST::VTableLayout*) native.ToPointer()); } CppSharp::Parser::AST::VTableLayout::~VTableLayout() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::VTableLayout::VTableLayout() @@ -1444,20 +1283,12 @@ CppSharp::Parser::AST::VFTableInfo::VFTableInfo(::CppSharp::CppParser::AST::VFTa CppSharp::Parser::AST::VFTableInfo^ CppSharp::Parser::AST::VFTableInfo::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::VFTableInfo::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::VFTableInfo^ CppSharp::Parser::AST::VFTableInfo::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::VFTableInfo^ result = gcnew ::CppSharp::Parser::AST::VFTableInfo((::CppSharp::CppParser::AST::VFTableInfo*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::VFTableInfo((::CppSharp::CppParser::AST::VFTableInfo*) native.ToPointer()); } CppSharp::Parser::AST::VFTableInfo::~VFTableInfo() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::VFTableInfo::VFTableInfo() @@ -1533,20 +1364,12 @@ CppSharp::Parser::AST::ClassLayout::ClassLayout(::CppSharp::CppParser::AST::Clas CppSharp::Parser::AST::ClassLayout^ CppSharp::Parser::AST::ClassLayout::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::ClassLayout::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::ClassLayout^ CppSharp::Parser::AST::ClassLayout::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::ClassLayout^ result = gcnew ::CppSharp::Parser::AST::ClassLayout((::CppSharp::CppParser::AST::ClassLayout*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::ClassLayout((::CppSharp::CppParser::AST::ClassLayout*) native.ToPointer()); } CppSharp::Parser::AST::ClassLayout::~ClassLayout() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::ClassLayout::ClassLayout() @@ -1678,20 +1501,12 @@ CppSharp::Parser::AST::Declaration::Declaration(::CppSharp::CppParser::AST::Decl CppSharp::Parser::AST::Declaration^ CppSharp::Parser::AST::Declaration::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::Declaration::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::Declaration^ CppSharp::Parser::AST::Declaration::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::Declaration^ result = gcnew ::CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*) native.ToPointer()); } CppSharp::Parser::AST::Declaration::~Declaration() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::Declaration::Declaration(CppSharp::Parser::AST::DeclarationKind kind) @@ -1903,14 +1718,7 @@ CppSharp::Parser::AST::DeclarationContext::DeclarationContext(::CppSharp::CppPar CppSharp::Parser::AST::DeclarationContext^ CppSharp::Parser::AST::DeclarationContext::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::DeclarationContext::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::DeclarationContext^ CppSharp::Parser::AST::DeclarationContext::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::DeclarationContext^ result = gcnew ::CppSharp::Parser::AST::DeclarationContext((::CppSharp::CppParser::AST::DeclarationContext*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::DeclarationContext((::CppSharp::CppParser::AST::DeclarationContext*) native.ToPointer()); } CppSharp::Parser::AST::DeclarationContext::~DeclarationContext() @@ -2160,14 +1968,7 @@ CppSharp::Parser::AST::TypedefDecl::TypedefDecl(::CppSharp::CppParser::AST::Type CppSharp::Parser::AST::TypedefDecl^ CppSharp::Parser::AST::TypedefDecl::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::TypedefDecl::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::TypedefDecl^ CppSharp::Parser::AST::TypedefDecl::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::TypedefDecl^ result = gcnew ::CppSharp::Parser::AST::TypedefDecl((::CppSharp::CppParser::AST::TypedefDecl*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::TypedefDecl((::CppSharp::CppParser::AST::TypedefDecl*) native.ToPointer()); } CppSharp::Parser::AST::TypedefDecl::~TypedefDecl() @@ -2208,14 +2009,7 @@ CppSharp::Parser::AST::Friend::Friend(::CppSharp::CppParser::AST::Friend* native CppSharp::Parser::AST::Friend^ CppSharp::Parser::AST::Friend::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::Friend::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::Friend^ CppSharp::Parser::AST::Friend::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::Friend^ result = gcnew ::CppSharp::Parser::AST::Friend((::CppSharp::CppParser::AST::Friend*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::Friend((::CppSharp::CppParser::AST::Friend*) native.ToPointer()); } CppSharp::Parser::AST::Friend::~Friend() @@ -2257,20 +2051,12 @@ CppSharp::Parser::AST::Statement::Statement(::CppSharp::CppParser::AST::Statemen CppSharp::Parser::AST::Statement^ CppSharp::Parser::AST::Statement::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::Statement::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::Statement^ CppSharp::Parser::AST::Statement::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::Statement^ result = gcnew ::CppSharp::Parser::AST::Statement((::CppSharp::CppParser::AST::Statement*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::Statement((::CppSharp::CppParser::AST::Statement*) native.ToPointer()); } CppSharp::Parser::AST::Statement::~Statement() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::Statement::Statement(CppSharp::Parser::AST::Statement^ _0) @@ -2333,14 +2119,7 @@ CppSharp::Parser::AST::Expression::Expression(::CppSharp::CppParser::AST::Expres CppSharp::Parser::AST::Expression^ CppSharp::Parser::AST::Expression::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::Expression::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::Expression^ CppSharp::Parser::AST::Expression::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::Expression^ result = gcnew ::CppSharp::Parser::AST::Expression((::CppSharp::CppParser::AST::Expression*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::Expression((::CppSharp::CppParser::AST::Expression*) native.ToPointer()); } CppSharp::Parser::AST::Expression::~Expression() @@ -2364,14 +2143,7 @@ CppSharp::Parser::AST::BinaryOperator::BinaryOperator(::CppSharp::CppParser::AST CppSharp::Parser::AST::BinaryOperator^ CppSharp::Parser::AST::BinaryOperator::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::BinaryOperator::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::BinaryOperator^ CppSharp::Parser::AST::BinaryOperator::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::BinaryOperator^ result = gcnew ::CppSharp::Parser::AST::BinaryOperator((::CppSharp::CppParser::AST::BinaryOperator*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::BinaryOperator((::CppSharp::CppParser::AST::BinaryOperator*) native.ToPointer()); } CppSharp::Parser::AST::BinaryOperator::~BinaryOperator() @@ -2429,14 +2201,7 @@ CppSharp::Parser::AST::CallExpr::CallExpr(::CppSharp::CppParser::AST::CallExpr* CppSharp::Parser::AST::CallExpr^ CppSharp::Parser::AST::CallExpr::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::CallExpr::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::CallExpr^ CppSharp::Parser::AST::CallExpr::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::CallExpr^ result = gcnew ::CppSharp::Parser::AST::CallExpr((::CppSharp::CppParser::AST::CallExpr*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::CallExpr((::CppSharp::CppParser::AST::CallExpr*) native.ToPointer()); } CppSharp::Parser::AST::CallExpr::~CallExpr() @@ -2486,14 +2251,7 @@ CppSharp::Parser::AST::CXXConstructExpr::CXXConstructExpr(::CppSharp::CppParser: CppSharp::Parser::AST::CXXConstructExpr^ CppSharp::Parser::AST::CXXConstructExpr::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::CXXConstructExpr::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::CXXConstructExpr^ CppSharp::Parser::AST::CXXConstructExpr::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::CXXConstructExpr^ result = gcnew ::CppSharp::Parser::AST::CXXConstructExpr((::CppSharp::CppParser::AST::CXXConstructExpr*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::CXXConstructExpr((::CppSharp::CppParser::AST::CXXConstructExpr*) native.ToPointer()); } CppSharp::Parser::AST::CXXConstructExpr::~CXXConstructExpr() @@ -2543,14 +2301,7 @@ CppSharp::Parser::AST::Parameter::Parameter(::CppSharp::CppParser::AST::Paramete CppSharp::Parser::AST::Parameter^ CppSharp::Parser::AST::Parameter::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::Parameter::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::Parameter^ CppSharp::Parser::AST::Parameter::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::Parameter^ result = gcnew ::CppSharp::Parser::AST::Parameter((::CppSharp::CppParser::AST::Parameter*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::Parameter((::CppSharp::CppParser::AST::Parameter*) native.ToPointer()); } CppSharp::Parser::AST::Parameter::~Parameter() @@ -2631,14 +2382,7 @@ CppSharp::Parser::AST::Function::Function(::CppSharp::CppParser::AST::Function* CppSharp::Parser::AST::Function^ CppSharp::Parser::AST::Function::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::Function::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::Function^ CppSharp::Parser::AST::Function::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::Function^ result = gcnew ::CppSharp::Parser::AST::Function((::CppSharp::CppParser::AST::Function*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::Function((::CppSharp::CppParser::AST::Function*) native.ToPointer()); } CppSharp::Parser::AST::Function::~Function() @@ -2823,14 +2567,7 @@ CppSharp::Parser::AST::Method::Method(::CppSharp::CppParser::AST::Method* native CppSharp::Parser::AST::Method^ CppSharp::Parser::AST::Method::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::Method::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::Method^ CppSharp::Parser::AST::Method::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::Method^ result = gcnew ::CppSharp::Parser::AST::Method((::CppSharp::CppParser::AST::Method*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::Method((::CppSharp::CppParser::AST::Method*) native.ToPointer()); } CppSharp::Parser::AST::Method::~Method() @@ -2981,14 +2718,7 @@ CppSharp::Parser::AST::Enumeration::Item::Item(::CppSharp::CppParser::AST::Enume CppSharp::Parser::AST::Enumeration::Item^ CppSharp::Parser::AST::Enumeration::Item::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::Enumeration::Item::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::Enumeration::Item^ CppSharp::Parser::AST::Enumeration::Item::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::Enumeration::Item^ result = gcnew ::CppSharp::Parser::AST::Enumeration::Item((::CppSharp::CppParser::AST::Enumeration::Item*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::Enumeration::Item((::CppSharp::CppParser::AST::Enumeration::Item*) native.ToPointer()); } CppSharp::Parser::AST::Enumeration::Item::~Item() @@ -3043,14 +2773,7 @@ CppSharp::Parser::AST::Enumeration::Enumeration(::CppSharp::CppParser::AST::Enum CppSharp::Parser::AST::Enumeration^ CppSharp::Parser::AST::Enumeration::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::Enumeration::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::Enumeration^ CppSharp::Parser::AST::Enumeration::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::Enumeration^ result = gcnew ::CppSharp::Parser::AST::Enumeration((::CppSharp::CppParser::AST::Enumeration*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::Enumeration((::CppSharp::CppParser::AST::Enumeration*) native.ToPointer()); } CppSharp::Parser::AST::Enumeration::~Enumeration() @@ -3137,14 +2860,7 @@ CppSharp::Parser::AST::Variable::Variable(::CppSharp::CppParser::AST::Variable* CppSharp::Parser::AST::Variable^ CppSharp::Parser::AST::Variable::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::Variable::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::Variable^ CppSharp::Parser::AST::Variable::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::Variable^ result = gcnew ::CppSharp::Parser::AST::Variable((::CppSharp::CppParser::AST::Variable*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::Variable((::CppSharp::CppParser::AST::Variable*) native.ToPointer()); } CppSharp::Parser::AST::Variable::~Variable() @@ -3200,20 +2916,12 @@ CppSharp::Parser::AST::BaseClassSpecifier::BaseClassSpecifier(::CppSharp::CppPar CppSharp::Parser::AST::BaseClassSpecifier^ CppSharp::Parser::AST::BaseClassSpecifier::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::BaseClassSpecifier::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::BaseClassSpecifier^ CppSharp::Parser::AST::BaseClassSpecifier::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::BaseClassSpecifier^ result = gcnew ::CppSharp::Parser::AST::BaseClassSpecifier((::CppSharp::CppParser::AST::BaseClassSpecifier*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::BaseClassSpecifier((::CppSharp::CppParser::AST::BaseClassSpecifier*) native.ToPointer()); } CppSharp::Parser::AST::BaseClassSpecifier::~BaseClassSpecifier() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::BaseClassSpecifier::BaseClassSpecifier() @@ -3288,14 +2996,7 @@ CppSharp::Parser::AST::Field::Field(::CppSharp::CppParser::AST::Field* native) CppSharp::Parser::AST::Field^ CppSharp::Parser::AST::Field::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::Field::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::Field^ CppSharp::Parser::AST::Field::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::Field^ result = gcnew ::CppSharp::Parser::AST::Field((::CppSharp::CppParser::AST::Field*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::Field((::CppSharp::CppParser::AST::Field*) native.ToPointer()); } CppSharp::Parser::AST::Field::~Field() @@ -3376,14 +3077,7 @@ CppSharp::Parser::AST::AccessSpecifierDecl::AccessSpecifierDecl(::CppSharp::CppP CppSharp::Parser::AST::AccessSpecifierDecl^ CppSharp::Parser::AST::AccessSpecifierDecl::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::AccessSpecifierDecl::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::AccessSpecifierDecl^ CppSharp::Parser::AST::AccessSpecifierDecl::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::AccessSpecifierDecl^ result = gcnew ::CppSharp::Parser::AST::AccessSpecifierDecl((::CppSharp::CppParser::AST::AccessSpecifierDecl*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::AccessSpecifierDecl((::CppSharp::CppParser::AST::AccessSpecifierDecl*) native.ToPointer()); } CppSharp::Parser::AST::AccessSpecifierDecl::~AccessSpecifierDecl() @@ -3414,14 +3108,7 @@ CppSharp::Parser::AST::Class::Class(::CppSharp::CppParser::AST::Class* native) CppSharp::Parser::AST::Class^ CppSharp::Parser::AST::Class::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::Class::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::Class^ CppSharp::Parser::AST::Class::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::Class^ result = gcnew ::CppSharp::Parser::AST::Class((::CppSharp::CppParser::AST::Class*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::Class((::CppSharp::CppParser::AST::Class*) native.ToPointer()); } CppSharp::Parser::AST::Class::~Class() @@ -3656,14 +3343,7 @@ CppSharp::Parser::AST::Template::Template(::CppSharp::CppParser::AST::Template* CppSharp::Parser::AST::Template^ CppSharp::Parser::AST::Template::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::Template::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::Template^ CppSharp::Parser::AST::Template::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::Template^ result = gcnew ::CppSharp::Parser::AST::Template((::CppSharp::CppParser::AST::Template*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::Template((::CppSharp::CppParser::AST::Template*) native.ToPointer()); } CppSharp::Parser::AST::Template::~Template() @@ -3738,14 +3418,7 @@ CppSharp::Parser::AST::ClassTemplate::ClassTemplate(::CppSharp::CppParser::AST:: CppSharp::Parser::AST::ClassTemplate^ CppSharp::Parser::AST::ClassTemplate::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::ClassTemplate::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::ClassTemplate^ CppSharp::Parser::AST::ClassTemplate::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::ClassTemplate^ result = gcnew ::CppSharp::Parser::AST::ClassTemplate((::CppSharp::CppParser::AST::ClassTemplate*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::ClassTemplate((::CppSharp::CppParser::AST::ClassTemplate*) native.ToPointer()); } CppSharp::Parser::AST::ClassTemplate::~ClassTemplate() @@ -3802,14 +3475,7 @@ CppSharp::Parser::AST::ClassTemplateSpecialization::ClassTemplateSpecialization( CppSharp::Parser::AST::ClassTemplateSpecialization^ CppSharp::Parser::AST::ClassTemplateSpecialization::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::ClassTemplateSpecialization::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::ClassTemplateSpecialization^ CppSharp::Parser::AST::ClassTemplateSpecialization::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::ClassTemplateSpecialization^ result = gcnew ::CppSharp::Parser::AST::ClassTemplateSpecialization((::CppSharp::CppParser::AST::ClassTemplateSpecialization*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::ClassTemplateSpecialization((::CppSharp::CppParser::AST::ClassTemplateSpecialization*) native.ToPointer()); } CppSharp::Parser::AST::ClassTemplateSpecialization::~ClassTemplateSpecialization() @@ -3886,14 +3552,7 @@ CppSharp::Parser::AST::ClassTemplatePartialSpecialization::ClassTemplatePartialS CppSharp::Parser::AST::ClassTemplatePartialSpecialization^ CppSharp::Parser::AST::ClassTemplatePartialSpecialization::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::ClassTemplatePartialSpecialization::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::ClassTemplatePartialSpecialization^ CppSharp::Parser::AST::ClassTemplatePartialSpecialization::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::ClassTemplatePartialSpecialization^ result = gcnew ::CppSharp::Parser::AST::ClassTemplatePartialSpecialization((::CppSharp::CppParser::AST::ClassTemplatePartialSpecialization*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::ClassTemplatePartialSpecialization((::CppSharp::CppParser::AST::ClassTemplatePartialSpecialization*) native.ToPointer()); } CppSharp::Parser::AST::ClassTemplatePartialSpecialization::~ClassTemplatePartialSpecialization() @@ -3924,14 +3583,7 @@ CppSharp::Parser::AST::FunctionTemplate::FunctionTemplate(::CppSharp::CppParser: CppSharp::Parser::AST::FunctionTemplate^ CppSharp::Parser::AST::FunctionTemplate::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::FunctionTemplate::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::FunctionTemplate^ CppSharp::Parser::AST::FunctionTemplate::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::FunctionTemplate^ result = gcnew ::CppSharp::Parser::AST::FunctionTemplate((::CppSharp::CppParser::AST::FunctionTemplate*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::FunctionTemplate((::CppSharp::CppParser::AST::FunctionTemplate*) native.ToPointer()); } CppSharp::Parser::AST::FunctionTemplate::~FunctionTemplate() @@ -3989,20 +3641,12 @@ CppSharp::Parser::AST::FunctionTemplateSpecialization::FunctionTemplateSpecializ CppSharp::Parser::AST::FunctionTemplateSpecialization^ CppSharp::Parser::AST::FunctionTemplateSpecialization::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::FunctionTemplateSpecialization::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::FunctionTemplateSpecialization^ CppSharp::Parser::AST::FunctionTemplateSpecialization::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::FunctionTemplateSpecialization^ result = gcnew ::CppSharp::Parser::AST::FunctionTemplateSpecialization((::CppSharp::CppParser::AST::FunctionTemplateSpecialization*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::FunctionTemplateSpecialization((::CppSharp::CppParser::AST::FunctionTemplateSpecialization*) native.ToPointer()); } CppSharp::Parser::AST::FunctionTemplateSpecialization::~FunctionTemplateSpecialization() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::FunctionTemplateSpecialization::FunctionTemplateSpecialization() @@ -4093,14 +3737,7 @@ CppSharp::Parser::AST::Namespace::Namespace(::CppSharp::CppParser::AST::Namespac CppSharp::Parser::AST::Namespace^ CppSharp::Parser::AST::Namespace::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::Namespace::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::Namespace^ CppSharp::Parser::AST::Namespace::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::Namespace^ result = gcnew ::CppSharp::Parser::AST::Namespace((::CppSharp::CppParser::AST::Namespace*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::Namespace((::CppSharp::CppParser::AST::Namespace*) native.ToPointer()); } CppSharp::Parser::AST::Namespace::~Namespace() @@ -4141,14 +3778,7 @@ CppSharp::Parser::AST::PreprocessedEntity::PreprocessedEntity(::CppSharp::CppPar CppSharp::Parser::AST::PreprocessedEntity^ CppSharp::Parser::AST::PreprocessedEntity::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::PreprocessedEntity::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::PreprocessedEntity^ CppSharp::Parser::AST::PreprocessedEntity::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::PreprocessedEntity^ result = gcnew ::CppSharp::Parser::AST::PreprocessedEntity((::CppSharp::CppParser::AST::PreprocessedEntity*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::PreprocessedEntity((::CppSharp::CppParser::AST::PreprocessedEntity*) native.ToPointer()); } CppSharp::Parser::AST::PreprocessedEntity::~PreprocessedEntity() @@ -4189,14 +3819,7 @@ CppSharp::Parser::AST::MacroDefinition::MacroDefinition(::CppSharp::CppParser::A CppSharp::Parser::AST::MacroDefinition^ CppSharp::Parser::AST::MacroDefinition::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::MacroDefinition::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::MacroDefinition^ CppSharp::Parser::AST::MacroDefinition::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::MacroDefinition^ result = gcnew ::CppSharp::Parser::AST::MacroDefinition((::CppSharp::CppParser::AST::MacroDefinition*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::MacroDefinition((::CppSharp::CppParser::AST::MacroDefinition*) native.ToPointer()); } CppSharp::Parser::AST::MacroDefinition::~MacroDefinition() @@ -4241,14 +3864,7 @@ CppSharp::Parser::AST::MacroExpansion::MacroExpansion(::CppSharp::CppParser::AST CppSharp::Parser::AST::MacroExpansion^ CppSharp::Parser::AST::MacroExpansion::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::MacroExpansion::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::MacroExpansion^ CppSharp::Parser::AST::MacroExpansion::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::MacroExpansion^ result = gcnew ::CppSharp::Parser::AST::MacroExpansion((::CppSharp::CppParser::AST::MacroExpansion*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::MacroExpansion((::CppSharp::CppParser::AST::MacroExpansion*) native.ToPointer()); } CppSharp::Parser::AST::MacroExpansion::~MacroExpansion() @@ -4303,14 +3919,7 @@ CppSharp::Parser::AST::TranslationUnit::TranslationUnit(::CppSharp::CppParser::A CppSharp::Parser::AST::TranslationUnit^ CppSharp::Parser::AST::TranslationUnit::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::TranslationUnit::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::TranslationUnit^ CppSharp::Parser::AST::TranslationUnit::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::TranslationUnit^ result = gcnew ::CppSharp::Parser::AST::TranslationUnit((::CppSharp::CppParser::AST::TranslationUnit*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::TranslationUnit((::CppSharp::CppParser::AST::TranslationUnit*) native.ToPointer()); } CppSharp::Parser::AST::TranslationUnit::~TranslationUnit() @@ -4392,20 +4001,12 @@ CppSharp::Parser::AST::NativeLibrary::NativeLibrary(::CppSharp::CppParser::AST:: CppSharp::Parser::AST::NativeLibrary^ CppSharp::Parser::AST::NativeLibrary::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::NativeLibrary::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::NativeLibrary^ CppSharp::Parser::AST::NativeLibrary::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::NativeLibrary^ result = gcnew ::CppSharp::Parser::AST::NativeLibrary((::CppSharp::CppParser::AST::NativeLibrary*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::NativeLibrary((::CppSharp::CppParser::AST::NativeLibrary*) native.ToPointer()); } CppSharp::Parser::AST::NativeLibrary::~NativeLibrary() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::NativeLibrary::NativeLibrary() @@ -4515,20 +4116,12 @@ CppSharp::Parser::AST::ASTContext::ASTContext(::CppSharp::CppParser::AST::ASTCon CppSharp::Parser::AST::ASTContext^ CppSharp::Parser::AST::ASTContext::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::ASTContext::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::ASTContext^ CppSharp::Parser::AST::ASTContext::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::ASTContext^ result = gcnew ::CppSharp::Parser::AST::ASTContext((::CppSharp::CppParser::AST::ASTContext*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::ASTContext((::CppSharp::CppParser::AST::ASTContext*) native.ToPointer()); } CppSharp::Parser::AST::ASTContext::~ASTContext() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::ASTContext::ASTContext() @@ -4590,20 +4183,12 @@ CppSharp::Parser::AST::Comment::Comment(::CppSharp::CppParser::AST::Comment* nat CppSharp::Parser::AST::Comment^ CppSharp::Parser::AST::Comment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::Comment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::Comment^ CppSharp::Parser::AST::Comment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::Comment^ result = gcnew ::CppSharp::Parser::AST::Comment((::CppSharp::CppParser::AST::Comment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::Comment((::CppSharp::CppParser::AST::Comment*) native.ToPointer()); } CppSharp::Parser::AST::Comment::~Comment() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::Comment::Comment(CppSharp::Parser::AST::CommentKind kind) @@ -4649,14 +4234,7 @@ CppSharp::Parser::AST::BlockContentComment::BlockContentComment(::CppSharp::CppP CppSharp::Parser::AST::BlockContentComment^ CppSharp::Parser::AST::BlockContentComment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::BlockContentComment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::BlockContentComment^ CppSharp::Parser::AST::BlockContentComment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::BlockContentComment^ result = gcnew ::CppSharp::Parser::AST::BlockContentComment((::CppSharp::CppParser::AST::BlockContentComment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::BlockContentComment((::CppSharp::CppParser::AST::BlockContentComment*) native.ToPointer()); } CppSharp::Parser::AST::BlockContentComment::~BlockContentComment() @@ -4695,14 +4273,7 @@ CppSharp::Parser::AST::FullComment::FullComment(::CppSharp::CppParser::AST::Full CppSharp::Parser::AST::FullComment^ CppSharp::Parser::AST::FullComment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::FullComment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::FullComment^ CppSharp::Parser::AST::FullComment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::FullComment^ result = gcnew ::CppSharp::Parser::AST::FullComment((::CppSharp::CppParser::AST::FullComment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::FullComment((::CppSharp::CppParser::AST::FullComment*) native.ToPointer()); } CppSharp::Parser::AST::FullComment::~FullComment() @@ -4760,20 +4331,12 @@ CppSharp::Parser::AST::BlockCommandComment::Argument::Argument(::CppSharp::CppPa CppSharp::Parser::AST::BlockCommandComment::Argument^ CppSharp::Parser::AST::BlockCommandComment::Argument::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::BlockCommandComment::Argument::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::BlockCommandComment::Argument^ CppSharp::Parser::AST::BlockCommandComment::Argument::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::BlockCommandComment::Argument^ result = gcnew ::CppSharp::Parser::AST::BlockCommandComment::Argument((::CppSharp::CppParser::AST::BlockCommandComment::Argument*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::BlockCommandComment::Argument((::CppSharp::CppParser::AST::BlockCommandComment::Argument*) native.ToPointer()); } CppSharp::Parser::AST::BlockCommandComment::Argument::~Argument() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::BlockCommandComment::Argument::Argument() @@ -4822,14 +4385,7 @@ CppSharp::Parser::AST::BlockCommandComment::BlockCommandComment(::CppSharp::CppP CppSharp::Parser::AST::BlockCommandComment^ CppSharp::Parser::AST::BlockCommandComment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::BlockCommandComment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::BlockCommandComment^ CppSharp::Parser::AST::BlockCommandComment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::BlockCommandComment^ result = gcnew ::CppSharp::Parser::AST::BlockCommandComment((::CppSharp::CppParser::AST::BlockCommandComment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::BlockCommandComment((::CppSharp::CppParser::AST::BlockCommandComment*) native.ToPointer()); } CppSharp::Parser::AST::BlockCommandComment::~BlockCommandComment() @@ -4904,14 +4460,7 @@ CppSharp::Parser::AST::ParamCommandComment::ParamCommandComment(::CppSharp::CppP CppSharp::Parser::AST::ParamCommandComment^ CppSharp::Parser::AST::ParamCommandComment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::ParamCommandComment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::ParamCommandComment^ CppSharp::Parser::AST::ParamCommandComment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::ParamCommandComment^ result = gcnew ::CppSharp::Parser::AST::ParamCommandComment((::CppSharp::CppParser::AST::ParamCommandComment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::ParamCommandComment((::CppSharp::CppParser::AST::ParamCommandComment*) native.ToPointer()); } CppSharp::Parser::AST::ParamCommandComment::~ParamCommandComment() @@ -4962,14 +4511,7 @@ CppSharp::Parser::AST::TParamCommandComment::TParamCommandComment(::CppSharp::Cp CppSharp::Parser::AST::TParamCommandComment^ CppSharp::Parser::AST::TParamCommandComment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::TParamCommandComment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::TParamCommandComment^ CppSharp::Parser::AST::TParamCommandComment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::TParamCommandComment^ result = gcnew ::CppSharp::Parser::AST::TParamCommandComment((::CppSharp::CppParser::AST::TParamCommandComment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::TParamCommandComment((::CppSharp::CppParser::AST::TParamCommandComment*) native.ToPointer()); } CppSharp::Parser::AST::TParamCommandComment::~TParamCommandComment() @@ -5024,14 +4566,7 @@ CppSharp::Parser::AST::VerbatimBlockLineComment::VerbatimBlockLineComment(::CppS CppSharp::Parser::AST::VerbatimBlockLineComment^ CppSharp::Parser::AST::VerbatimBlockLineComment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::VerbatimBlockLineComment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::VerbatimBlockLineComment^ CppSharp::Parser::AST::VerbatimBlockLineComment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::VerbatimBlockLineComment^ result = gcnew ::CppSharp::Parser::AST::VerbatimBlockLineComment((::CppSharp::CppParser::AST::VerbatimBlockLineComment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::VerbatimBlockLineComment((::CppSharp::CppParser::AST::VerbatimBlockLineComment*) native.ToPointer()); } CppSharp::Parser::AST::VerbatimBlockLineComment::~VerbatimBlockLineComment() @@ -5076,14 +4611,7 @@ CppSharp::Parser::AST::VerbatimBlockComment::VerbatimBlockComment(::CppSharp::Cp CppSharp::Parser::AST::VerbatimBlockComment^ CppSharp::Parser::AST::VerbatimBlockComment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::VerbatimBlockComment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::VerbatimBlockComment^ CppSharp::Parser::AST::VerbatimBlockComment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::VerbatimBlockComment^ result = gcnew ::CppSharp::Parser::AST::VerbatimBlockComment((::CppSharp::CppParser::AST::VerbatimBlockComment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::VerbatimBlockComment((::CppSharp::CppParser::AST::VerbatimBlockComment*) native.ToPointer()); } CppSharp::Parser::AST::VerbatimBlockComment::~VerbatimBlockComment() @@ -5140,14 +4668,7 @@ CppSharp::Parser::AST::VerbatimLineComment::VerbatimLineComment(::CppSharp::CppP CppSharp::Parser::AST::VerbatimLineComment^ CppSharp::Parser::AST::VerbatimLineComment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::VerbatimLineComment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::VerbatimLineComment^ CppSharp::Parser::AST::VerbatimLineComment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::VerbatimLineComment^ result = gcnew ::CppSharp::Parser::AST::VerbatimLineComment((::CppSharp::CppParser::AST::VerbatimLineComment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::VerbatimLineComment((::CppSharp::CppParser::AST::VerbatimLineComment*) native.ToPointer()); } CppSharp::Parser::AST::VerbatimLineComment::~VerbatimLineComment() @@ -5192,14 +4713,7 @@ CppSharp::Parser::AST::InlineContentComment::InlineContentComment(::CppSharp::Cp CppSharp::Parser::AST::InlineContentComment^ CppSharp::Parser::AST::InlineContentComment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::InlineContentComment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::InlineContentComment^ CppSharp::Parser::AST::InlineContentComment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::InlineContentComment^ result = gcnew ::CppSharp::Parser::AST::InlineContentComment((::CppSharp::CppParser::AST::InlineContentComment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::InlineContentComment((::CppSharp::CppParser::AST::InlineContentComment*) native.ToPointer()); } CppSharp::Parser::AST::InlineContentComment::~InlineContentComment() @@ -5238,14 +4752,7 @@ CppSharp::Parser::AST::ParagraphComment::ParagraphComment(::CppSharp::CppParser: CppSharp::Parser::AST::ParagraphComment^ CppSharp::Parser::AST::ParagraphComment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::ParagraphComment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::ParagraphComment^ CppSharp::Parser::AST::ParagraphComment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::ParagraphComment^ result = gcnew ::CppSharp::Parser::AST::ParagraphComment((::CppSharp::CppParser::AST::ParagraphComment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::ParagraphComment((::CppSharp::CppParser::AST::ParagraphComment*) native.ToPointer()); } CppSharp::Parser::AST::ParagraphComment::~ParagraphComment() @@ -5313,20 +4820,12 @@ CppSharp::Parser::AST::InlineCommandComment::Argument::Argument(::CppSharp::CppP CppSharp::Parser::AST::InlineCommandComment::Argument^ CppSharp::Parser::AST::InlineCommandComment::Argument::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::InlineCommandComment::Argument::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::InlineCommandComment::Argument^ CppSharp::Parser::AST::InlineCommandComment::Argument::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::InlineCommandComment::Argument^ result = gcnew ::CppSharp::Parser::AST::InlineCommandComment::Argument((::CppSharp::CppParser::AST::InlineCommandComment::Argument*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::InlineCommandComment::Argument((::CppSharp::CppParser::AST::InlineCommandComment::Argument*) native.ToPointer()); } CppSharp::Parser::AST::InlineCommandComment::Argument::~Argument() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::InlineCommandComment::Argument::Argument() @@ -5375,14 +4874,7 @@ CppSharp::Parser::AST::InlineCommandComment::InlineCommandComment(::CppSharp::Cp CppSharp::Parser::AST::InlineCommandComment^ CppSharp::Parser::AST::InlineCommandComment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::InlineCommandComment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::InlineCommandComment^ CppSharp::Parser::AST::InlineCommandComment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::InlineCommandComment^ result = gcnew ::CppSharp::Parser::AST::InlineCommandComment((::CppSharp::CppParser::AST::InlineCommandComment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::InlineCommandComment((::CppSharp::CppParser::AST::InlineCommandComment*) native.ToPointer()); } CppSharp::Parser::AST::InlineCommandComment::~InlineCommandComment() @@ -5449,14 +4941,7 @@ CppSharp::Parser::AST::HTMLTagComment::HTMLTagComment(::CppSharp::CppParser::AST CppSharp::Parser::AST::HTMLTagComment^ CppSharp::Parser::AST::HTMLTagComment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::HTMLTagComment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::HTMLTagComment^ CppSharp::Parser::AST::HTMLTagComment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::HTMLTagComment^ result = gcnew ::CppSharp::Parser::AST::HTMLTagComment((::CppSharp::CppParser::AST::HTMLTagComment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::HTMLTagComment((::CppSharp::CppParser::AST::HTMLTagComment*) native.ToPointer()); } CppSharp::Parser::AST::HTMLTagComment::~HTMLTagComment() @@ -5496,20 +4981,12 @@ CppSharp::Parser::AST::HTMLStartTagComment::Attribute::Attribute(::CppSharp::Cpp CppSharp::Parser::AST::HTMLStartTagComment::Attribute^ CppSharp::Parser::AST::HTMLStartTagComment::Attribute::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::HTMLStartTagComment::Attribute::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::HTMLStartTagComment::Attribute^ CppSharp::Parser::AST::HTMLStartTagComment::Attribute::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::HTMLStartTagComment::Attribute^ result = gcnew ::CppSharp::Parser::AST::HTMLStartTagComment::Attribute((::CppSharp::CppParser::AST::HTMLStartTagComment::Attribute*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::HTMLStartTagComment::Attribute((::CppSharp::CppParser::AST::HTMLStartTagComment::Attribute*) native.ToPointer()); } CppSharp::Parser::AST::HTMLStartTagComment::Attribute::~Attribute() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::HTMLStartTagComment::Attribute::Attribute() @@ -5572,14 +5049,7 @@ CppSharp::Parser::AST::HTMLStartTagComment::HTMLStartTagComment(::CppSharp::CppP CppSharp::Parser::AST::HTMLStartTagComment^ CppSharp::Parser::AST::HTMLStartTagComment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::HTMLStartTagComment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::HTMLStartTagComment^ CppSharp::Parser::AST::HTMLStartTagComment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::HTMLStartTagComment^ result = gcnew ::CppSharp::Parser::AST::HTMLStartTagComment((::CppSharp::CppParser::AST::HTMLStartTagComment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::HTMLStartTagComment((::CppSharp::CppParser::AST::HTMLStartTagComment*) native.ToPointer()); } CppSharp::Parser::AST::HTMLStartTagComment::~HTMLStartTagComment() @@ -5650,14 +5120,7 @@ CppSharp::Parser::AST::HTMLEndTagComment::HTMLEndTagComment(::CppSharp::CppParse CppSharp::Parser::AST::HTMLEndTagComment^ CppSharp::Parser::AST::HTMLEndTagComment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::HTMLEndTagComment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::HTMLEndTagComment^ CppSharp::Parser::AST::HTMLEndTagComment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::HTMLEndTagComment^ result = gcnew ::CppSharp::Parser::AST::HTMLEndTagComment((::CppSharp::CppParser::AST::HTMLEndTagComment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::HTMLEndTagComment((::CppSharp::CppParser::AST::HTMLEndTagComment*) native.ToPointer()); } CppSharp::Parser::AST::HTMLEndTagComment::~HTMLEndTagComment() @@ -5702,14 +5165,7 @@ CppSharp::Parser::AST::TextComment::TextComment(::CppSharp::CppParser::AST::Text CppSharp::Parser::AST::TextComment^ CppSharp::Parser::AST::TextComment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::TextComment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::TextComment^ CppSharp::Parser::AST::TextComment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::TextComment^ result = gcnew ::CppSharp::Parser::AST::TextComment((::CppSharp::CppParser::AST::TextComment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::TextComment((::CppSharp::CppParser::AST::TextComment*) native.ToPointer()); } CppSharp::Parser::AST::TextComment::~TextComment() @@ -5755,20 +5211,12 @@ CppSharp::Parser::AST::RawComment::RawComment(::CppSharp::CppParser::AST::RawCom CppSharp::Parser::AST::RawComment^ CppSharp::Parser::AST::RawComment::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::AST::RawComment::__CreateInstance(native, false); -} - -CppSharp::Parser::AST::RawComment^ CppSharp::Parser::AST::RawComment::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::AST::RawComment^ result = gcnew ::CppSharp::Parser::AST::RawComment((::CppSharp::CppParser::AST::RawComment*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::AST::RawComment((::CppSharp::CppParser::AST::RawComment*) native.ToPointer()); } CppSharp::Parser::AST::RawComment::~RawComment() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::AST::RawComment::RawComment() diff --git a/src/CppParser/Bindings/CLI/AST.h b/src/CppParser/Bindings/CLI/AST.h index 73d80b76..87b90f72 100644 --- a/src/CppParser/Bindings/CLI/AST.h +++ b/src/CppParser/Bindings/CLI/AST.h @@ -352,7 +352,6 @@ namespace CppSharp Type(::CppSharp::CppParser::AST::Type* native); static Type^ __CreateInstance(::System::IntPtr native); - static Type^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Type(CppSharp::Parser::AST::TypeKind kind); Type(CppSharp::Parser::AST::Type^ _0); @@ -388,7 +387,6 @@ namespace CppSharp TypeQualifiers(::CppSharp::CppParser::AST::TypeQualifiers* native); static TypeQualifiers^ __CreateInstance(::System::IntPtr native); - static TypeQualifiers^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); TypeQualifiers(CppSharp::Parser::AST::TypeQualifiers^ _0); TypeQualifiers(); @@ -430,7 +428,6 @@ namespace CppSharp QualifiedType(::CppSharp::CppParser::AST::QualifiedType* native); static QualifiedType^ __CreateInstance(::System::IntPtr native); - static QualifiedType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); QualifiedType(); QualifiedType(CppSharp::Parser::AST::QualifiedType^ _0); @@ -459,7 +456,6 @@ namespace CppSharp TagType(::CppSharp::CppParser::AST::TagType* native); static TagType^ __CreateInstance(::System::IntPtr native); - static TagType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); TagType(); TagType(CppSharp::Parser::AST::TagType^ _0); @@ -487,7 +483,6 @@ namespace CppSharp ArrayType(::CppSharp::CppParser::AST::ArrayType* native); static ArrayType^ __CreateInstance(::System::IntPtr native); - static ArrayType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); ArrayType(); ArrayType(CppSharp::Parser::AST::ArrayType^ _0); @@ -525,7 +520,6 @@ namespace CppSharp FunctionType(::CppSharp::CppParser::AST::FunctionType* native); static FunctionType^ __CreateInstance(::System::IntPtr native); - static FunctionType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); FunctionType(); FunctionType(CppSharp::Parser::AST::FunctionType^ _0); @@ -570,7 +564,6 @@ namespace CppSharp PointerType(::CppSharp::CppParser::AST::PointerType* native); static PointerType^ __CreateInstance(::System::IntPtr native); - static PointerType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); PointerType(); PointerType(CppSharp::Parser::AST::PointerType^ _0); @@ -596,7 +589,6 @@ namespace CppSharp MemberPointerType(::CppSharp::CppParser::AST::MemberPointerType* native); static MemberPointerType^ __CreateInstance(::System::IntPtr native); - static MemberPointerType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); MemberPointerType(); MemberPointerType(CppSharp::Parser::AST::MemberPointerType^ _0); @@ -616,7 +608,6 @@ namespace CppSharp TypedefType(::CppSharp::CppParser::AST::TypedefType* native); static TypedefType^ __CreateInstance(::System::IntPtr native); - static TypedefType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); TypedefType(); TypedefType(CppSharp::Parser::AST::TypedefType^ _0); @@ -636,7 +627,6 @@ namespace CppSharp AttributedType(::CppSharp::CppParser::AST::AttributedType* native); static AttributedType^ __CreateInstance(::System::IntPtr native); - static AttributedType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); AttributedType(); AttributedType(CppSharp::Parser::AST::AttributedType^ _0); @@ -662,7 +652,6 @@ namespace CppSharp DecayedType(::CppSharp::CppParser::AST::DecayedType* native); static DecayedType^ __CreateInstance(::System::IntPtr native); - static DecayedType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); DecayedType(); DecayedType(CppSharp::Parser::AST::DecayedType^ _0); @@ -713,7 +702,6 @@ namespace CppSharp TemplateArgument(::CppSharp::CppParser::AST::TemplateArgument* native); static TemplateArgument^ __CreateInstance(::System::IntPtr native); - static TemplateArgument^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); TemplateArgument(); TemplateArgument(CppSharp::Parser::AST::TemplateArgument^ _0); @@ -754,7 +742,6 @@ namespace CppSharp TemplateSpecializationType(::CppSharp::CppParser::AST::TemplateSpecializationType* native); static TemplateSpecializationType^ __CreateInstance(::System::IntPtr native); - static TemplateSpecializationType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); TemplateSpecializationType(); TemplateSpecializationType(CppSharp::Parser::AST::TemplateSpecializationType^ _0); @@ -798,7 +785,6 @@ namespace CppSharp TemplateParameter(::CppSharp::CppParser::AST::TemplateParameter* native); static TemplateParameter^ __CreateInstance(::System::IntPtr native); - static TemplateParameter^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); TemplateParameter(); TemplateParameter(CppSharp::Parser::AST::TemplateParameter^ _0); @@ -831,7 +817,6 @@ namespace CppSharp TemplateParameterType(::CppSharp::CppParser::AST::TemplateParameterType* native); static TemplateParameterType^ __CreateInstance(::System::IntPtr native); - static TemplateParameterType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); TemplateParameterType(); TemplateParameterType(CppSharp::Parser::AST::TemplateParameterType^ _0); @@ -869,7 +854,6 @@ namespace CppSharp TemplateParameterSubstitutionType(::CppSharp::CppParser::AST::TemplateParameterSubstitutionType* native); static TemplateParameterSubstitutionType^ __CreateInstance(::System::IntPtr native); - static TemplateParameterSubstitutionType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); TemplateParameterSubstitutionType(); TemplateParameterSubstitutionType(CppSharp::Parser::AST::TemplateParameterSubstitutionType^ _0); @@ -889,7 +873,6 @@ namespace CppSharp InjectedClassNameType(::CppSharp::CppParser::AST::InjectedClassNameType* native); static InjectedClassNameType^ __CreateInstance(::System::IntPtr native); - static InjectedClassNameType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); InjectedClassNameType(); InjectedClassNameType(CppSharp::Parser::AST::InjectedClassNameType^ _0); @@ -915,7 +898,6 @@ namespace CppSharp DependentNameType(::CppSharp::CppParser::AST::DependentNameType* native); static DependentNameType^ __CreateInstance(::System::IntPtr native); - static DependentNameType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); DependentNameType(); DependentNameType(CppSharp::Parser::AST::DependentNameType^ _0); @@ -929,7 +911,6 @@ namespace CppSharp PackExpansionType(::CppSharp::CppParser::AST::PackExpansionType* native); static PackExpansionType^ __CreateInstance(::System::IntPtr native); - static PackExpansionType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); PackExpansionType(); PackExpansionType(CppSharp::Parser::AST::PackExpansionType^ _0); @@ -943,7 +924,6 @@ namespace CppSharp BuiltinType(::CppSharp::CppParser::AST::BuiltinType* native); static BuiltinType^ __CreateInstance(::System::IntPtr native); - static BuiltinType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); BuiltinType(); BuiltinType(CppSharp::Parser::AST::BuiltinType^ _0); @@ -970,7 +950,6 @@ namespace CppSharp VTableComponent(::CppSharp::CppParser::AST::VTableComponent* native); static VTableComponent^ __CreateInstance(::System::IntPtr native); - static VTableComponent^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); VTableComponent(); VTableComponent(CppSharp::Parser::AST::VTableComponent^ _0); @@ -1012,7 +991,6 @@ namespace CppSharp VTableLayout(::CppSharp::CppParser::AST::VTableLayout* native); static VTableLayout^ __CreateInstance(::System::IntPtr native); - static VTableLayout^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); VTableLayout(); VTableLayout(CppSharp::Parser::AST::VTableLayout^ _0); @@ -1047,7 +1025,6 @@ namespace CppSharp VFTableInfo(::CppSharp::CppParser::AST::VFTableInfo* native); static VFTableInfo^ __CreateInstance(::System::IntPtr native); - static VFTableInfo^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); VFTableInfo(); VFTableInfo(CppSharp::Parser::AST::VFTableInfo^ _0); @@ -1095,7 +1072,6 @@ namespace CppSharp ClassLayout(::CppSharp::CppParser::AST::ClassLayout* native); static ClassLayout^ __CreateInstance(::System::IntPtr native); - static ClassLayout^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); ClassLayout(); ClassLayout(CppSharp::Parser::AST::ClassLayout^ _0); @@ -1172,7 +1148,6 @@ namespace CppSharp Declaration(::CppSharp::CppParser::AST::Declaration* native); static Declaration^ __CreateInstance(::System::IntPtr native); - static Declaration^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Declaration(CppSharp::Parser::AST::DeclarationKind kind); Declaration(CppSharp::Parser::AST::Declaration^ _0); @@ -1284,7 +1259,6 @@ namespace CppSharp DeclarationContext(::CppSharp::CppParser::AST::DeclarationContext* native); static DeclarationContext^ __CreateInstance(::System::IntPtr native); - static DeclarationContext^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); DeclarationContext(CppSharp::Parser::AST::DeclarationKind kind); DeclarationContext(CppSharp::Parser::AST::DeclarationContext^ _0); @@ -1392,7 +1366,6 @@ namespace CppSharp TypedefDecl(::CppSharp::CppParser::AST::TypedefDecl* native); static TypedefDecl^ __CreateInstance(::System::IntPtr native); - static TypedefDecl^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); TypedefDecl(); TypedefDecl(CppSharp::Parser::AST::TypedefDecl^ _0); @@ -1412,7 +1385,6 @@ namespace CppSharp Friend(::CppSharp::CppParser::AST::Friend* native); static Friend^ __CreateInstance(::System::IntPtr native); - static Friend^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Friend(); Friend(CppSharp::Parser::AST::Friend^ _0); @@ -1439,7 +1411,6 @@ namespace CppSharp Statement(::CppSharp::CppParser::AST::Statement* native); static Statement^ __CreateInstance(::System::IntPtr native); - static Statement^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Statement(CppSharp::Parser::AST::Statement^ _0); ~Statement(); @@ -1472,7 +1443,6 @@ namespace CppSharp Expression(::CppSharp::CppParser::AST::Expression* native); static Expression^ __CreateInstance(::System::IntPtr native); - static Expression^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Expression(CppSharp::Parser::AST::Expression^ _0); ~Expression(); @@ -1484,7 +1454,6 @@ namespace CppSharp BinaryOperator(::CppSharp::CppParser::AST::BinaryOperator* native); static BinaryOperator^ __CreateInstance(::System::IntPtr native); - static BinaryOperator^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); BinaryOperator(CppSharp::Parser::AST::BinaryOperator^ _0); ~BinaryOperator(); @@ -1514,7 +1483,6 @@ namespace CppSharp CallExpr(::CppSharp::CppParser::AST::CallExpr* native); static CallExpr^ __CreateInstance(::System::IntPtr native); - static CallExpr^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); CallExpr(CppSharp::Parser::AST::CallExpr^ _0); ~CallExpr(); @@ -1537,7 +1505,6 @@ namespace CppSharp CXXConstructExpr(::CppSharp::CppParser::AST::CXXConstructExpr* native); static CXXConstructExpr^ __CreateInstance(::System::IntPtr native); - static CXXConstructExpr^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); CXXConstructExpr(CppSharp::Parser::AST::CXXConstructExpr^ _0); ~CXXConstructExpr(); @@ -1560,7 +1527,6 @@ namespace CppSharp Parameter(::CppSharp::CppParser::AST::Parameter* native); static Parameter^ __CreateInstance(::System::IntPtr native); - static Parameter^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Parameter(); Parameter(CppSharp::Parser::AST::Parameter^ _0); @@ -1604,7 +1570,6 @@ namespace CppSharp Function(::CppSharp::CppParser::AST::Function* native); static Function^ __CreateInstance(::System::IntPtr native); - static Function^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Function(); Function(CppSharp::Parser::AST::Function^ _0); @@ -1701,7 +1666,6 @@ namespace CppSharp Method(::CppSharp::CppParser::AST::Method* native); static Method^ __CreateInstance(::System::IntPtr native); - static Method^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Method(); Method(CppSharp::Parser::AST::Method^ _0); @@ -1799,7 +1763,6 @@ namespace CppSharp Item(::CppSharp::CppParser::AST::Enumeration::Item* native); static Item^ __CreateInstance(::System::IntPtr native); - static Item^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Item(); Item(CppSharp::Parser::AST::Enumeration::Item^ _0); @@ -1821,7 +1784,6 @@ namespace CppSharp Enumeration(::CppSharp::CppParser::AST::Enumeration* native); static Enumeration^ __CreateInstance(::System::IntPtr native); - static Enumeration^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Enumeration(); Enumeration(CppSharp::Parser::AST::Enumeration^ _0); @@ -1864,7 +1826,6 @@ namespace CppSharp Variable(::CppSharp::CppParser::AST::Variable* native); static Variable^ __CreateInstance(::System::IntPtr native); - static Variable^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Variable(); Variable(CppSharp::Parser::AST::Variable^ _0); @@ -1897,7 +1858,6 @@ namespace CppSharp BaseClassSpecifier(::CppSharp::CppParser::AST::BaseClassSpecifier* native); static BaseClassSpecifier^ __CreateInstance(::System::IntPtr native); - static BaseClassSpecifier^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); BaseClassSpecifier(); BaseClassSpecifier(CppSharp::Parser::AST::BaseClassSpecifier^ _0); @@ -1938,7 +1898,6 @@ namespace CppSharp Field(::CppSharp::CppParser::AST::Field* native); static Field^ __CreateInstance(::System::IntPtr native); - static Field^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Field(); Field(CppSharp::Parser::AST::Field^ _0); @@ -1982,7 +1941,6 @@ namespace CppSharp AccessSpecifierDecl(::CppSharp::CppParser::AST::AccessSpecifierDecl* native); static AccessSpecifierDecl^ __CreateInstance(::System::IntPtr native); - static AccessSpecifierDecl^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); AccessSpecifierDecl(); AccessSpecifierDecl(CppSharp::Parser::AST::AccessSpecifierDecl^ _0); @@ -1996,7 +1954,6 @@ namespace CppSharp Class(::CppSharp::CppParser::AST::Class* native); static Class^ __CreateInstance(::System::IntPtr native); - static Class^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Class(); Class(CppSharp::Parser::AST::Class^ _0); @@ -2114,7 +2071,6 @@ namespace CppSharp Template(::CppSharp::CppParser::AST::Template* native); static Template^ __CreateInstance(::System::IntPtr native); - static Template^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Template(CppSharp::Parser::AST::DeclarationKind kind); Template(); @@ -2147,7 +2103,6 @@ namespace CppSharp ClassTemplate(::CppSharp::CppParser::AST::ClassTemplate* native); static ClassTemplate^ __CreateInstance(::System::IntPtr native); - static ClassTemplate^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); ClassTemplate(); ClassTemplate(CppSharp::Parser::AST::ClassTemplate^ _0); @@ -2172,7 +2127,6 @@ namespace CppSharp ClassTemplateSpecialization(::CppSharp::CppParser::AST::ClassTemplateSpecialization* native); static ClassTemplateSpecialization^ __CreateInstance(::System::IntPtr native); - static ClassTemplateSpecialization^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); ClassTemplateSpecialization(); ClassTemplateSpecialization(CppSharp::Parser::AST::ClassTemplateSpecialization^ _0); @@ -2209,7 +2163,6 @@ namespace CppSharp ClassTemplatePartialSpecialization(::CppSharp::CppParser::AST::ClassTemplatePartialSpecialization* native); static ClassTemplatePartialSpecialization^ __CreateInstance(::System::IntPtr native); - static ClassTemplatePartialSpecialization^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); ClassTemplatePartialSpecialization(); ClassTemplatePartialSpecialization(CppSharp::Parser::AST::ClassTemplatePartialSpecialization^ _0); @@ -2223,7 +2176,6 @@ namespace CppSharp FunctionTemplate(::CppSharp::CppParser::AST::FunctionTemplate* native); static FunctionTemplate^ __CreateInstance(::System::IntPtr native); - static FunctionTemplate^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); FunctionTemplate(); FunctionTemplate(CppSharp::Parser::AST::FunctionTemplate^ _0); @@ -2255,7 +2207,6 @@ namespace CppSharp FunctionTemplateSpecialization(::CppSharp::CppParser::AST::FunctionTemplateSpecialization* native); static FunctionTemplateSpecialization^ __CreateInstance(::System::IntPtr native); - static FunctionTemplateSpecialization^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); FunctionTemplateSpecialization(); FunctionTemplateSpecialization(CppSharp::Parser::AST::FunctionTemplateSpecialization^ _0); @@ -2301,7 +2252,6 @@ namespace CppSharp Namespace(::CppSharp::CppParser::AST::Namespace* native); static Namespace^ __CreateInstance(::System::IntPtr native); - static Namespace^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Namespace(); Namespace(CppSharp::Parser::AST::Namespace^ _0); @@ -2321,7 +2271,6 @@ namespace CppSharp PreprocessedEntity(::CppSharp::CppParser::AST::PreprocessedEntity* native); static PreprocessedEntity^ __CreateInstance(::System::IntPtr native); - static PreprocessedEntity^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); PreprocessedEntity(); PreprocessedEntity(CppSharp::Parser::AST::PreprocessedEntity^ _0); @@ -2341,7 +2290,6 @@ namespace CppSharp MacroDefinition(::CppSharp::CppParser::AST::MacroDefinition* native); static MacroDefinition^ __CreateInstance(::System::IntPtr native); - static MacroDefinition^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); MacroDefinition(); MacroDefinition(CppSharp::Parser::AST::MacroDefinition^ _0); @@ -2361,7 +2309,6 @@ namespace CppSharp MacroExpansion(::CppSharp::CppParser::AST::MacroExpansion* native); static MacroExpansion^ __CreateInstance(::System::IntPtr native); - static MacroExpansion^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); MacroExpansion(); MacroExpansion(CppSharp::Parser::AST::MacroExpansion^ _0); @@ -2387,7 +2334,6 @@ namespace CppSharp TranslationUnit(::CppSharp::CppParser::AST::TranslationUnit* native); static TranslationUnit^ __CreateInstance(::System::IntPtr native); - static TranslationUnit^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); TranslationUnit(); TranslationUnit(CppSharp::Parser::AST::TranslationUnit^ _0); @@ -2431,7 +2377,6 @@ namespace CppSharp NativeLibrary(::CppSharp::CppParser::AST::NativeLibrary* native); static NativeLibrary^ __CreateInstance(::System::IntPtr native); - static NativeLibrary^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); NativeLibrary(); NativeLibrary(CppSharp::Parser::AST::NativeLibrary^ _0); @@ -2489,7 +2434,6 @@ namespace CppSharp ASTContext(::CppSharp::CppParser::AST::ASTContext* native); static ASTContext^ __CreateInstance(::System::IntPtr native); - static ASTContext^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); ASTContext(); ASTContext(CppSharp::Parser::AST::ASTContext^ _0); @@ -2524,7 +2468,6 @@ namespace CppSharp Comment(::CppSharp::CppParser::AST::Comment* native); static Comment^ __CreateInstance(::System::IntPtr native); - static Comment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Comment(CppSharp::Parser::AST::CommentKind kind); Comment(CppSharp::Parser::AST::Comment^ _0); @@ -2547,7 +2490,6 @@ namespace CppSharp BlockContentComment(::CppSharp::CppParser::AST::BlockContentComment* native); static BlockContentComment^ __CreateInstance(::System::IntPtr native); - static BlockContentComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); BlockContentComment(); BlockContentComment(CppSharp::Parser::AST::CommentKind Kind); @@ -2563,7 +2505,6 @@ namespace CppSharp FullComment(::CppSharp::CppParser::AST::FullComment* native); static FullComment^ __CreateInstance(::System::IntPtr native); - static FullComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); FullComment(); FullComment(CppSharp::Parser::AST::FullComment^ _0); @@ -2599,7 +2540,6 @@ namespace CppSharp Argument(::CppSharp::CppParser::AST::BlockCommandComment::Argument* native); static Argument^ __CreateInstance(::System::IntPtr native); - static Argument^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Argument(); Argument(CppSharp::Parser::AST::BlockCommandComment::Argument^ _0); @@ -2618,7 +2558,6 @@ namespace CppSharp BlockCommandComment(::CppSharp::CppParser::AST::BlockCommandComment* native); static BlockCommandComment^ __CreateInstance(::System::IntPtr native); - static BlockCommandComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); BlockCommandComment(); BlockCommandComment(CppSharp::Parser::AST::CommentKind Kind); @@ -2658,7 +2597,6 @@ namespace CppSharp ParamCommandComment(::CppSharp::CppParser::AST::ParamCommandComment* native); static ParamCommandComment^ __CreateInstance(::System::IntPtr native); - static ParamCommandComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); ParamCommandComment(); ParamCommandComment(CppSharp::Parser::AST::ParamCommandComment^ _0); @@ -2684,7 +2622,6 @@ namespace CppSharp TParamCommandComment(::CppSharp::CppParser::AST::TParamCommandComment* native); static TParamCommandComment^ __CreateInstance(::System::IntPtr native); - static TParamCommandComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); TParamCommandComment(); TParamCommandComment(CppSharp::Parser::AST::TParamCommandComment^ _0); @@ -2709,7 +2646,6 @@ namespace CppSharp VerbatimBlockLineComment(::CppSharp::CppParser::AST::VerbatimBlockLineComment* native); static VerbatimBlockLineComment^ __CreateInstance(::System::IntPtr native); - static VerbatimBlockLineComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); VerbatimBlockLineComment(); VerbatimBlockLineComment(CppSharp::Parser::AST::VerbatimBlockLineComment^ _0); @@ -2729,7 +2665,6 @@ namespace CppSharp VerbatimBlockComment(::CppSharp::CppParser::AST::VerbatimBlockComment* native); static VerbatimBlockComment^ __CreateInstance(::System::IntPtr native); - static VerbatimBlockComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); VerbatimBlockComment(); VerbatimBlockComment(CppSharp::Parser::AST::VerbatimBlockComment^ _0); @@ -2754,7 +2689,6 @@ namespace CppSharp VerbatimLineComment(::CppSharp::CppParser::AST::VerbatimLineComment* native); static VerbatimLineComment^ __CreateInstance(::System::IntPtr native); - static VerbatimLineComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); VerbatimLineComment(); VerbatimLineComment(CppSharp::Parser::AST::VerbatimLineComment^ _0); @@ -2774,7 +2708,6 @@ namespace CppSharp InlineContentComment(::CppSharp::CppParser::AST::InlineContentComment* native); static InlineContentComment^ __CreateInstance(::System::IntPtr native); - static InlineContentComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); InlineContentComment(); InlineContentComment(CppSharp::Parser::AST::CommentKind Kind); @@ -2790,7 +2723,6 @@ namespace CppSharp ParagraphComment(::CppSharp::CppParser::AST::ParagraphComment* native); static ParagraphComment^ __CreateInstance(::System::IntPtr native); - static ParagraphComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); ParagraphComment(); ParagraphComment(CppSharp::Parser::AST::ParagraphComment^ _0); @@ -2840,7 +2772,6 @@ namespace CppSharp Argument(::CppSharp::CppParser::AST::InlineCommandComment::Argument* native); static Argument^ __CreateInstance(::System::IntPtr native); - static Argument^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Argument(); Argument(CppSharp::Parser::AST::InlineCommandComment::Argument^ _0); @@ -2859,7 +2790,6 @@ namespace CppSharp InlineCommandComment(::CppSharp::CppParser::AST::InlineCommandComment* native); static InlineCommandComment^ __CreateInstance(::System::IntPtr native); - static InlineCommandComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); InlineCommandComment(); InlineCommandComment(CppSharp::Parser::AST::InlineCommandComment^ _0); @@ -2890,7 +2820,6 @@ namespace CppSharp HTMLTagComment(::CppSharp::CppParser::AST::HTMLTagComment* native); static HTMLTagComment^ __CreateInstance(::System::IntPtr native); - static HTMLTagComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); HTMLTagComment(); HTMLTagComment(CppSharp::Parser::AST::CommentKind Kind); @@ -2917,7 +2846,6 @@ namespace CppSharp Attribute(::CppSharp::CppParser::AST::HTMLStartTagComment::Attribute* native); static Attribute^ __CreateInstance(::System::IntPtr native); - static Attribute^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); Attribute(); Attribute(CppSharp::Parser::AST::HTMLStartTagComment::Attribute^ _0); @@ -2942,7 +2870,6 @@ namespace CppSharp HTMLStartTagComment(::CppSharp::CppParser::AST::HTMLStartTagComment* native); static HTMLStartTagComment^ __CreateInstance(::System::IntPtr native); - static HTMLStartTagComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); HTMLStartTagComment(); HTMLStartTagComment(CppSharp::Parser::AST::HTMLStartTagComment^ _0); @@ -2973,7 +2900,6 @@ namespace CppSharp HTMLEndTagComment(::CppSharp::CppParser::AST::HTMLEndTagComment* native); static HTMLEndTagComment^ __CreateInstance(::System::IntPtr native); - static HTMLEndTagComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); HTMLEndTagComment(); HTMLEndTagComment(CppSharp::Parser::AST::HTMLEndTagComment^ _0); @@ -2993,7 +2919,6 @@ namespace CppSharp TextComment(::CppSharp::CppParser::AST::TextComment* native); static TextComment^ __CreateInstance(::System::IntPtr native); - static TextComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); TextComment(); TextComment(CppSharp::Parser::AST::TextComment^ _0); @@ -3020,7 +2945,6 @@ namespace CppSharp RawComment(::CppSharp::CppParser::AST::RawComment* native); static RawComment^ __CreateInstance(::System::IntPtr native); - static RawComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); RawComment(); RawComment(CppSharp::Parser::AST::RawComment^ _0); diff --git a/src/CppParser/Bindings/CLI/CppParser.cpp b/src/CppParser/Bindings/CLI/CppParser.cpp index b854c1a6..32d5cadb 100644 --- a/src/CppParser/Bindings/CLI/CppParser.cpp +++ b/src/CppParser/Bindings/CLI/CppParser.cpp @@ -13,20 +13,12 @@ CppSharp::Parser::ParserOptions::ParserOptions(::CppSharp::CppParser::ParserOpti CppSharp::Parser::ParserOptions^ CppSharp::Parser::ParserOptions::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::ParserOptions::__CreateInstance(native, false); -} - -CppSharp::Parser::ParserOptions^ CppSharp::Parser::ParserOptions::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::ParserOptions^ result = gcnew ::CppSharp::Parser::ParserOptions((::CppSharp::CppParser::ParserOptions*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::ParserOptions((::CppSharp::CppParser::ParserOptions*) native.ToPointer()); } CppSharp::Parser::ParserOptions::~ParserOptions() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::ParserOptions::ParserOptions() @@ -330,20 +322,12 @@ CppSharp::Parser::ParserDiagnostic::ParserDiagnostic(::CppSharp::CppParser::Pars CppSharp::Parser::ParserDiagnostic^ CppSharp::Parser::ParserDiagnostic::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::ParserDiagnostic::__CreateInstance(native, false); -} - -CppSharp::Parser::ParserDiagnostic^ CppSharp::Parser::ParserDiagnostic::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::ParserDiagnostic^ result = gcnew ::CppSharp::Parser::ParserDiagnostic((::CppSharp::CppParser::ParserDiagnostic*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::ParserDiagnostic((::CppSharp::CppParser::ParserDiagnostic*) native.ToPointer()); } CppSharp::Parser::ParserDiagnostic::~ParserDiagnostic() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::ParserDiagnostic::ParserDiagnostic() @@ -437,20 +421,12 @@ CppSharp::Parser::ParserResult::ParserResult(::CppSharp::CppParser::ParserResult CppSharp::Parser::ParserResult^ CppSharp::Parser::ParserResult::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::ParserResult::__CreateInstance(native, false); -} - -CppSharp::Parser::ParserResult^ CppSharp::Parser::ParserResult::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::ParserResult^ result = gcnew ::CppSharp::Parser::ParserResult((::CppSharp::CppParser::ParserResult*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::ParserResult((::CppSharp::CppParser::ParserResult*) native.ToPointer()); } CppSharp::Parser::ParserResult::~ParserResult() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::ParserResult::ParserResult() @@ -542,20 +518,12 @@ CppSharp::Parser::ClangParser::ClangParser(::CppSharp::CppParser::ClangParser* n CppSharp::Parser::ClangParser^ CppSharp::Parser::ClangParser::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::ClangParser::__CreateInstance(native, false); -} - -CppSharp::Parser::ClangParser^ CppSharp::Parser::ClangParser::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::ClangParser^ result = gcnew ::CppSharp::Parser::ClangParser((::CppSharp::CppParser::ClangParser*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::ClangParser((::CppSharp::CppParser::ClangParser*) native.ToPointer()); } CppSharp::Parser::ClangParser::~ClangParser() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::ParserResult^ CppSharp::Parser::ClangParser::ParseHeader(CppSharp::Parser::ParserOptions^ Opts) diff --git a/src/CppParser/Bindings/CLI/CppParser.h b/src/CppParser/Bindings/CLI/CppParser.h index a1ea679e..02aae067 100644 --- a/src/CppParser/Bindings/CLI/CppParser.h +++ b/src/CppParser/Bindings/CLI/CppParser.h @@ -78,7 +78,6 @@ namespace CppSharp ParserOptions(::CppSharp::CppParser::ParserOptions* native); static ParserOptions^ __CreateInstance(::System::IntPtr native); - static ParserOptions^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); ParserOptions(); ParserOptions(CppSharp::Parser::ParserOptions^ _0); @@ -234,7 +233,6 @@ namespace CppSharp ParserDiagnostic(::CppSharp::CppParser::ParserDiagnostic* native); static ParserDiagnostic^ __CreateInstance(::System::IntPtr native); - static ParserDiagnostic^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); ParserDiagnostic(); ParserDiagnostic(CppSharp::Parser::ParserDiagnostic^ _0); @@ -288,7 +286,6 @@ namespace CppSharp ParserResult(::CppSharp::CppParser::ParserResult* native); static ParserResult^ __CreateInstance(::System::IntPtr native); - static ParserResult^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); ParserResult(); ParserResult(CppSharp::Parser::ParserResult^ _0); @@ -341,7 +338,6 @@ namespace CppSharp ClangParser(::CppSharp::CppParser::ClangParser* native); static ClangParser^ __CreateInstance(::System::IntPtr native); - static ClangParser^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); ClangParser(); ClangParser(CppSharp::Parser::ClangParser^ _0); diff --git a/src/CppParser/Bindings/CLI/Target.cpp b/src/CppParser/Bindings/CLI/Target.cpp index f41e0a28..9afcc31a 100644 --- a/src/CppParser/Bindings/CLI/Target.cpp +++ b/src/CppParser/Bindings/CLI/Target.cpp @@ -11,20 +11,12 @@ CppSharp::Parser::ParserTargetInfo::ParserTargetInfo(::CppSharp::CppParser::Pars CppSharp::Parser::ParserTargetInfo^ CppSharp::Parser::ParserTargetInfo::__CreateInstance(::System::IntPtr native) { - return ::CppSharp::Parser::ParserTargetInfo::__CreateInstance(native, false); -} - -CppSharp::Parser::ParserTargetInfo^ CppSharp::Parser::ParserTargetInfo::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance) -{ - ::CppSharp::Parser::ParserTargetInfo^ result = gcnew ::CppSharp::Parser::ParserTargetInfo((::CppSharp::CppParser::ParserTargetInfo*) native.ToPointer()); - result->__ownsNativeInstance = __ownsNativeInstance; - return result; + return gcnew ::CppSharp::Parser::ParserTargetInfo((::CppSharp::CppParser::ParserTargetInfo*) native.ToPointer()); } CppSharp::Parser::ParserTargetInfo::~ParserTargetInfo() { - if (__ownsNativeInstance) - delete NativePtr; + delete NativePtr; } CppSharp::Parser::ParserTargetInfo::ParserTargetInfo() diff --git a/src/CppParser/Bindings/CLI/Target.h b/src/CppParser/Bindings/CLI/Target.h index a5cef524..9699cf16 100644 --- a/src/CppParser/Bindings/CLI/Target.h +++ b/src/CppParser/Bindings/CLI/Target.h @@ -44,7 +44,6 @@ namespace CppSharp ParserTargetInfo(::CppSharp::CppParser::ParserTargetInfo* native); static ParserTargetInfo^ __CreateInstance(::System::IntPtr native); - static ParserTargetInfo^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance); ParserTargetInfo(); ParserTargetInfo(CppSharp::Parser::ParserTargetInfo^ _0); diff --git a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs index 07a03a35..34defa39 100644 --- a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs +++ b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs @@ -274,9 +274,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Type __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Type __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Type((Type.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Type((Type.Internal*) native, skipVTables); } public static Type __CreateInstance(Type.Internal native, bool skipVTables = false) @@ -332,8 +332,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.Type __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -395,9 +393,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static TypeQualifiers __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static TypeQualifiers __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TypeQualifiers((TypeQualifiers.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TypeQualifiers((TypeQualifiers.Internal*) native, skipVTables); } public static TypeQualifiers __CreateInstance(TypeQualifiers.Internal native, bool skipVTables = false) @@ -448,8 +446,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.TypeQualifiers __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -526,9 +522,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static QualifiedType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static QualifiedType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new QualifiedType((QualifiedType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new QualifiedType((QualifiedType.Internal*) native, skipVTables); } public static QualifiedType __CreateInstance(QualifiedType.Internal native, bool skipVTables = false) @@ -580,8 +576,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.QualifiedType __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -645,9 +639,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new TagType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TagType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TagType((TagType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TagType((TagType.Internal*) native, skipVTables); } public static TagType __CreateInstance(TagType.Internal native, bool skipVTables = false) @@ -760,9 +754,9 @@ namespace CppSharp Incomplete = 3 } - public static new ArrayType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ArrayType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ArrayType((ArrayType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ArrayType((ArrayType.Internal*) native, skipVTables); } public static ArrayType __CreateInstance(ArrayType.Internal native, bool skipVTables = false) @@ -920,9 +914,9 @@ namespace CppSharp internal static extern uint getParametersCount_0(global::System.IntPtr instance); } - public static new FunctionType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new FunctionType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new FunctionType((FunctionType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new FunctionType((FunctionType.Internal*) native, skipVTables); } public static FunctionType __CreateInstance(FunctionType.Internal native, bool skipVTables = false) @@ -1070,9 +1064,9 @@ namespace CppSharp RVReference = 3 } - public static new PointerType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new PointerType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new PointerType((PointerType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new PointerType((PointerType.Internal*) native, skipVTables); } public static PointerType __CreateInstance(PointerType.Internal native, bool skipVTables = false) @@ -1176,9 +1170,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new MemberPointerType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new MemberPointerType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new MemberPointerType((MemberPointerType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new MemberPointerType((MemberPointerType.Internal*) native, skipVTables); } public static MemberPointerType __CreateInstance(MemberPointerType.Internal native, bool skipVTables = false) @@ -1269,9 +1263,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new TypedefType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TypedefType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TypedefType((TypedefType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TypedefType((TypedefType.Internal*) native, skipVTables); } public static TypedefType __CreateInstance(TypedefType.Internal native, bool skipVTables = false) @@ -1370,9 +1364,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new AttributedType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new AttributedType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new AttributedType((AttributedType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new AttributedType((AttributedType.Internal*) native, skipVTables); } public static AttributedType __CreateInstance(AttributedType.Internal native, bool skipVTables = false) @@ -1482,9 +1476,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new DecayedType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new DecayedType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new DecayedType((DecayedType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new DecayedType((DecayedType.Internal*) native, skipVTables); } public static DecayedType __CreateInstance(DecayedType.Internal native, bool skipVTables = false) @@ -1624,9 +1618,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static TemplateArgument __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static TemplateArgument __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateArgument((TemplateArgument.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateArgument((TemplateArgument.Internal*) native, skipVTables); } public static TemplateArgument __CreateInstance(TemplateArgument.Internal native, bool skipVTables = false) @@ -1678,8 +1672,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.TemplateArgument __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -1797,9 +1789,9 @@ namespace CppSharp internal static extern uint getArgumentsCount_0(global::System.IntPtr instance); } - public static new TemplateSpecializationType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TemplateSpecializationType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateSpecializationType((TemplateSpecializationType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateSpecializationType((TemplateSpecializationType.Internal*) native, skipVTables); } public static TemplateSpecializationType __CreateInstance(TemplateSpecializationType.Internal native, bool skipVTables = false) @@ -1965,9 +1957,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static TemplateParameter __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static TemplateParameter __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateParameter((TemplateParameter.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateParameter((TemplateParameter.Internal*) native, skipVTables); } public static TemplateParameter __CreateInstance(TemplateParameter.Internal native, bool skipVTables = false) @@ -2022,8 +2014,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.TemplateParameter __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -2129,9 +2119,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new TemplateParameterType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TemplateParameterType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateParameterType((TemplateParameterType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateParameterType((TemplateParameterType.Internal*) native, skipVTables); } public static TemplateParameterType __CreateInstance(TemplateParameterType.Internal native, bool skipVTables = false) @@ -2261,9 +2251,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new TemplateParameterSubstitutionType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TemplateParameterSubstitutionType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateParameterSubstitutionType((TemplateParameterSubstitutionType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateParameterSubstitutionType((TemplateParameterSubstitutionType.Internal*) native, skipVTables); } public static TemplateParameterSubstitutionType __CreateInstance(TemplateParameterSubstitutionType.Internal native, bool skipVTables = false) @@ -2357,9 +2347,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new InjectedClassNameType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new InjectedClassNameType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new InjectedClassNameType((InjectedClassNameType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new InjectedClassNameType((InjectedClassNameType.Internal*) native, skipVTables); } public static InjectedClassNameType __CreateInstance(InjectedClassNameType.Internal native, bool skipVTables = false) @@ -2470,9 +2460,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new DependentNameType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new DependentNameType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new DependentNameType((DependentNameType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new DependentNameType((DependentNameType.Internal*) native, skipVTables); } public static DependentNameType __CreateInstance(DependentNameType.Internal native, bool skipVTables = false) @@ -2547,9 +2537,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new PackExpansionType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new PackExpansionType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new PackExpansionType((PackExpansionType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new PackExpansionType((PackExpansionType.Internal*) native, skipVTables); } public static PackExpansionType __CreateInstance(PackExpansionType.Internal native, bool skipVTables = false) @@ -2627,9 +2617,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new BuiltinType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new BuiltinType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BuiltinType((BuiltinType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BuiltinType((BuiltinType.Internal*) native, skipVTables); } public static BuiltinType __CreateInstance(BuiltinType.Internal native, bool skipVTables = false) @@ -2728,9 +2718,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static VTableComponent __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static VTableComponent __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VTableComponent((VTableComponent.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VTableComponent((VTableComponent.Internal*) native, skipVTables); } public static VTableComponent __CreateInstance(VTableComponent.Internal native, bool skipVTables = false) @@ -2782,8 +2772,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.VTableComponent __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -2884,9 +2872,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static VTableLayout __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static VTableLayout __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VTableLayout((VTableLayout.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VTableLayout((VTableLayout.Internal*) native, skipVTables); } public static VTableLayout __CreateInstance(VTableLayout.Internal native, bool skipVTables = false) @@ -2941,8 +2929,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.VTableLayout __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -3021,9 +3007,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static VFTableInfo __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static VFTableInfo __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VFTableInfo((VFTableInfo.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VFTableInfo((VFTableInfo.Internal*) native, skipVTables); } public static VFTableInfo __CreateInstance(VFTableInfo.Internal native, bool skipVTables = false) @@ -3078,8 +3064,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.VFTableInfo __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -3210,9 +3194,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ClassLayout __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ClassLayout __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClassLayout((ClassLayout.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClassLayout((ClassLayout.Internal*) native, skipVTables); } public static ClassLayout __CreateInstance(ClassLayout.Internal native, bool skipVTables = false) @@ -3267,8 +3251,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.ClassLayout __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -3502,9 +3484,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Declaration __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Declaration __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Declaration((Declaration.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Declaration((Declaration.Internal*) native, skipVTables); } public static Declaration __CreateInstance(Declaration.Internal native, bool skipVTables = false) @@ -3560,8 +3542,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.Declaration __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -4026,9 +4006,9 @@ namespace CppSharp internal static extern uint getFriendsCount_0(global::System.IntPtr instance); } - public static new DeclarationContext __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new DeclarationContext __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new DeclarationContext((DeclarationContext.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new DeclarationContext((DeclarationContext.Internal*) native, skipVTables); } public static DeclarationContext __CreateInstance(DeclarationContext.Internal native, bool skipVTables = false) @@ -4419,9 +4399,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new TypedefDecl __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TypedefDecl __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TypedefDecl((TypedefDecl.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TypedefDecl((TypedefDecl.Internal*) native, skipVTables); } public static TypedefDecl __CreateInstance(TypedefDecl.Internal native, bool skipVTables = false) @@ -4547,9 +4527,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Friend __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Friend __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Friend((Friend.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Friend((Friend.Internal*) native, skipVTables); } public static Friend __CreateInstance(Friend.Internal native, bool skipVTables = false) @@ -4660,9 +4640,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Statement __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Statement __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Statement((Statement.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Statement((Statement.Internal*) native, skipVTables); } public static Statement __CreateInstance(Statement.Internal native, bool skipVTables = false) @@ -4709,8 +4689,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.Statement __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -4788,9 +4766,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Expression __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Expression __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Expression((Expression.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Expression((Expression.Internal*) native, skipVTables); } public static Expression __CreateInstance(Expression.Internal native, bool skipVTables = false) @@ -4872,9 +4850,9 @@ namespace CppSharp internal static extern void setOpcodeStr_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new BinaryOperator __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new BinaryOperator __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BinaryOperator((BinaryOperator.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BinaryOperator((BinaryOperator.Internal*) native, skipVTables); } public static BinaryOperator __CreateInstance(BinaryOperator.Internal native, bool skipVTables = false) @@ -5012,9 +4990,9 @@ namespace CppSharp internal static extern uint getArgumentsCount_0(global::System.IntPtr instance); } - public static new CallExpr __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new CallExpr __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new CallExpr((CallExpr.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new CallExpr((CallExpr.Internal*) native, skipVTables); } public static CallExpr __CreateInstance(CallExpr.Internal native, bool skipVTables = false) @@ -5133,9 +5111,9 @@ namespace CppSharp internal static extern uint getArgumentsCount_0(global::System.IntPtr instance); } - public static new CXXConstructExpr __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new CXXConstructExpr __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new CXXConstructExpr((CXXConstructExpr.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new CXXConstructExpr((CXXConstructExpr.Internal*) native, skipVTables); } public static CXXConstructExpr __CreateInstance(CXXConstructExpr.Internal native, bool skipVTables = false) @@ -5284,9 +5262,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Parameter __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Parameter __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Parameter((Parameter.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Parameter((Parameter.Internal*) native, skipVTables); } public static Parameter __CreateInstance(Parameter.Internal native, bool skipVTables = false) @@ -5536,9 +5514,9 @@ namespace CppSharp internal static extern uint getParametersCount_0(global::System.IntPtr instance); } - public static new Function __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Function __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Function((Function.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Function((Function.Internal*) native, skipVTables); } public static Function __CreateInstance(Function.Internal native, bool skipVTables = false) @@ -5914,9 +5892,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Method __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Method __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Method((Method.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Method((Method.Internal*) native, skipVTables); } public static Method __CreateInstance(Method.Internal native, bool skipVTables = false) @@ -6297,9 +6275,9 @@ namespace CppSharp internal static extern void setExpression_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new Item __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Item __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Item((Item.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Item((Item.Internal*) native, skipVTables); } public static Item __CreateInstance(Item.Internal native, bool skipVTables = false) @@ -6381,9 +6359,9 @@ namespace CppSharp } } - public static new Enumeration __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Enumeration __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Enumeration((Enumeration.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Enumeration((Enumeration.Internal*) native, skipVTables); } public static Enumeration __CreateInstance(Enumeration.Internal native, bool skipVTables = false) @@ -6584,9 +6562,9 @@ namespace CppSharp internal static extern void setMangled_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new Variable __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Variable __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Variable((Variable.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Variable((Variable.Internal*) native, skipVTables); } public static Variable __CreateInstance(Variable.Internal native, bool skipVTables = false) @@ -6704,9 +6682,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static BaseClassSpecifier __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static BaseClassSpecifier __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BaseClassSpecifier((BaseClassSpecifier.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BaseClassSpecifier((BaseClassSpecifier.Internal*) native, skipVTables); } public static BaseClassSpecifier __CreateInstance(BaseClassSpecifier.Internal native, bool skipVTables = false) @@ -6758,8 +6736,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.BaseClassSpecifier __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -6896,9 +6872,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Field __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Field __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Field((Field.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Field((Field.Internal*) native, skipVTables); } public static Field __CreateInstance(Field.Internal native, bool skipVTables = false) @@ -7078,9 +7054,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new AccessSpecifierDecl __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new AccessSpecifierDecl __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new AccessSpecifierDecl((AccessSpecifierDecl.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new AccessSpecifierDecl((AccessSpecifierDecl.Internal*) native, skipVTables); } public static AccessSpecifierDecl __CreateInstance(AccessSpecifierDecl.Internal native, bool skipVTables = false) @@ -7303,9 +7279,9 @@ namespace CppSharp internal static extern uint getSpecifiersCount_0(global::System.IntPtr instance); } - public static new Class __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Class __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Class((Class.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Class((Class.Internal*) native, skipVTables); } public static Class __CreateInstance(Class.Internal native, bool skipVTables = false) @@ -7710,9 +7686,9 @@ namespace CppSharp internal static extern uint getParametersCount_0(global::System.IntPtr instance); } - public static new Template __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Template __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Template((Template.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Template((Template.Internal*) native, skipVTables); } public static Template __CreateInstance(Template.Internal native, bool skipVTables = false) @@ -7902,9 +7878,9 @@ namespace CppSharp internal static extern uint getSpecializationsCount_0(global::System.IntPtr instance); } - public static new ClassTemplate __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ClassTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClassTemplate((ClassTemplate.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClassTemplate((ClassTemplate.Internal*) native, skipVTables); } public static ClassTemplate __CreateInstance(ClassTemplate.Internal native, bool skipVTables = false) @@ -8106,9 +8082,9 @@ namespace CppSharp internal static extern uint getArgumentsCount_0(global::System.IntPtr instance); } - public static new ClassTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ClassTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClassTemplateSpecialization((ClassTemplateSpecialization.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClassTemplateSpecialization((ClassTemplateSpecialization.Internal*) native, skipVTables); } public static ClassTemplateSpecialization __CreateInstance(ClassTemplateSpecialization.Internal native, bool skipVTables = false) @@ -8317,9 +8293,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new ClassTemplatePartialSpecialization __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ClassTemplatePartialSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClassTemplatePartialSpecialization((ClassTemplatePartialSpecialization.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClassTemplatePartialSpecialization((ClassTemplatePartialSpecialization.Internal*) native, skipVTables); } public static ClassTemplatePartialSpecialization __CreateInstance(ClassTemplatePartialSpecialization.Internal native, bool skipVTables = false) @@ -8452,9 +8428,9 @@ namespace CppSharp internal static extern uint getSpecializationsCount_0(global::System.IntPtr instance); } - public static new FunctionTemplate __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new FunctionTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new FunctionTemplate((FunctionTemplate.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new FunctionTemplate((FunctionTemplate.Internal*) native, skipVTables); } public static FunctionTemplate __CreateInstance(FunctionTemplate.Internal native, bool skipVTables = false) @@ -8598,9 +8574,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static FunctionTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static FunctionTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new FunctionTemplateSpecialization((FunctionTemplateSpecialization.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new FunctionTemplateSpecialization((FunctionTemplateSpecialization.Internal*) native, skipVTables); } public static FunctionTemplateSpecialization __CreateInstance(FunctionTemplateSpecialization.Internal native, bool skipVTables = false) @@ -8655,8 +8631,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.FunctionTemplateSpecialization __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -8806,9 +8780,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Namespace __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Namespace __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Namespace((Namespace.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Namespace((Namespace.Internal*) native, skipVTables); } public static Namespace __CreateInstance(Namespace.Internal native, bool skipVTables = false) @@ -8934,9 +8908,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new PreprocessedEntity __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new PreprocessedEntity __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new PreprocessedEntity((PreprocessedEntity.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new PreprocessedEntity((PreprocessedEntity.Internal*) native, skipVTables); } public static PreprocessedEntity __CreateInstance(PreprocessedEntity.Internal native, bool skipVTables = false) @@ -9072,9 +9046,9 @@ namespace CppSharp internal static extern void setExpression_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new MacroDefinition __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new MacroDefinition __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new MacroDefinition((MacroDefinition.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new MacroDefinition((MacroDefinition.Internal*) native, skipVTables); } public static MacroDefinition __CreateInstance(MacroDefinition.Internal native, bool skipVTables = false) @@ -9216,9 +9190,9 @@ namespace CppSharp internal static extern void setText_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new MacroExpansion __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new MacroExpansion __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new MacroExpansion((MacroExpansion.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new MacroExpansion((MacroExpansion.Internal*) native, skipVTables); } public static MacroExpansion __CreateInstance(MacroExpansion.Internal native, bool skipVTables = false) @@ -9401,9 +9375,9 @@ namespace CppSharp internal static extern uint getMacrosCount_0(global::System.IntPtr instance); } - public static new TranslationUnit __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TranslationUnit __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TranslationUnit((TranslationUnit.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TranslationUnit((TranslationUnit.Internal*) native, skipVTables); } public static TranslationUnit __CreateInstance(TranslationUnit.Internal native, bool skipVTables = false) @@ -9600,9 +9574,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static NativeLibrary __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static NativeLibrary __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new NativeLibrary((NativeLibrary.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new NativeLibrary((NativeLibrary.Internal*) native, skipVTables); } public static NativeLibrary __CreateInstance(NativeLibrary.Internal native, bool skipVTables = false) @@ -9657,8 +9631,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.NativeLibrary __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -9799,9 +9771,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ASTContext __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ASTContext __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ASTContext((ASTContext.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ASTContext((ASTContext.Internal*) native, skipVTables); } public static ASTContext __CreateInstance(ASTContext.Internal native, bool skipVTables = false) @@ -9856,8 +9828,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.ASTContext __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -9926,9 +9896,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Comment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Comment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Comment((Comment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Comment((Comment.Internal*) native, skipVTables); } public static Comment __CreateInstance(Comment.Internal native, bool skipVTables = false) @@ -9981,8 +9951,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.Comment __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -10027,9 +9995,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new BlockContentComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new BlockContentComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BlockContentComment((BlockContentComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BlockContentComment((BlockContentComment.Internal*) native, skipVTables); } public static BlockContentComment __CreateInstance(BlockContentComment.Internal native, bool skipVTables = false) @@ -10133,9 +10101,9 @@ namespace CppSharp internal static extern uint getBlocksCount_0(global::System.IntPtr instance); } - public static new FullComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new FullComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new FullComment((FullComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new FullComment((FullComment.Internal*) native, skipVTables); } public static FullComment __CreateInstance(FullComment.Internal native, bool skipVTables = false) @@ -10312,9 +10280,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Argument __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Argument __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Argument((Argument.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Argument((Argument.Internal*) native, skipVTables); } public static Argument __CreateInstance(Argument.Internal native, bool skipVTables = false) @@ -10369,8 +10337,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.BlockCommandComment.Argument __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -10395,9 +10361,9 @@ namespace CppSharp } } - public static new BlockCommandComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new BlockCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BlockCommandComment((BlockCommandComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BlockCommandComment((BlockCommandComment.Internal*) native, skipVTables); } public static BlockCommandComment __CreateInstance(BlockCommandComment.Internal native, bool skipVTables = false) @@ -10542,9 +10508,9 @@ namespace CppSharp InOut = 2 } - public static new ParamCommandComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ParamCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParamCommandComment((ParamCommandComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParamCommandComment((ParamCommandComment.Internal*) native, skipVTables); } public static ParamCommandComment __CreateInstance(ParamCommandComment.Internal native, bool skipVTables = false) @@ -10670,9 +10636,9 @@ namespace CppSharp internal static extern uint getPositionCount_0(global::System.IntPtr instance); } - public static new TParamCommandComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TParamCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TParamCommandComment((TParamCommandComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TParamCommandComment((TParamCommandComment.Internal*) native, skipVTables); } public static TParamCommandComment __CreateInstance(TParamCommandComment.Internal native, bool skipVTables = false) @@ -10788,9 +10754,9 @@ namespace CppSharp internal static extern void setText_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new VerbatimBlockLineComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new VerbatimBlockLineComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VerbatimBlockLineComment((VerbatimBlockLineComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VerbatimBlockLineComment((VerbatimBlockLineComment.Internal*) native, skipVTables); } public static VerbatimBlockLineComment __CreateInstance(VerbatimBlockLineComment.Internal native, bool skipVTables = false) @@ -10906,9 +10872,9 @@ namespace CppSharp internal static extern uint getLinesCount_0(global::System.IntPtr instance); } - public static new VerbatimBlockComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new VerbatimBlockComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VerbatimBlockComment((VerbatimBlockComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VerbatimBlockComment((VerbatimBlockComment.Internal*) native, skipVTables); } public static VerbatimBlockComment __CreateInstance(VerbatimBlockComment.Internal native, bool skipVTables = false) @@ -11031,9 +10997,9 @@ namespace CppSharp internal static extern void setText_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new VerbatimLineComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new VerbatimLineComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VerbatimLineComment((VerbatimLineComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VerbatimLineComment((VerbatimLineComment.Internal*) native, skipVTables); } public static VerbatimLineComment __CreateInstance(VerbatimLineComment.Internal native, bool skipVTables = false) @@ -11126,9 +11092,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new InlineContentComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new InlineContentComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new InlineContentComment((InlineContentComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new InlineContentComment((InlineContentComment.Internal*) native, skipVTables); } public static InlineContentComment __CreateInstance(InlineContentComment.Internal native, bool skipVTables = false) @@ -11235,9 +11201,9 @@ namespace CppSharp internal static extern uint getContentCount_0(global::System.IntPtr instance); } - public static new ParagraphComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ParagraphComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParagraphComment((ParagraphComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParagraphComment((ParagraphComment.Internal*) native, skipVTables); } public static ParagraphComment __CreateInstance(ParagraphComment.Internal native, bool skipVTables = false) @@ -11430,9 +11396,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Argument __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Argument __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Argument((Argument.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Argument((Argument.Internal*) native, skipVTables); } public static Argument __CreateInstance(Argument.Internal native, bool skipVTables = false) @@ -11487,8 +11453,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.InlineCommandComment.Argument __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -11513,9 +11477,9 @@ namespace CppSharp } } - public static new InlineCommandComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new InlineCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new InlineCommandComment((InlineCommandComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new InlineCommandComment((InlineCommandComment.Internal*) native, skipVTables); } public static InlineCommandComment __CreateInstance(InlineCommandComment.Internal native, bool skipVTables = false) @@ -11634,9 +11598,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new HTMLTagComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new HTMLTagComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new HTMLTagComment((HTMLTagComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new HTMLTagComment((HTMLTagComment.Internal*) native, skipVTables); } public static HTMLTagComment __CreateInstance(HTMLTagComment.Internal native, bool skipVTables = false) @@ -11799,9 +11763,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Attribute __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Attribute __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Attribute((Attribute.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Attribute((Attribute.Internal*) native, skipVTables); } public static Attribute __CreateInstance(Attribute.Internal native, bool skipVTables = false) @@ -11856,8 +11820,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.HTMLStartTagComment.Attribute __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -11898,9 +11860,9 @@ namespace CppSharp } } - public static new HTMLStartTagComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new HTMLStartTagComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new HTMLStartTagComment((HTMLStartTagComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new HTMLStartTagComment((HTMLStartTagComment.Internal*) native, skipVTables); } public static HTMLStartTagComment __CreateInstance(HTMLStartTagComment.Internal native, bool skipVTables = false) @@ -12032,9 +11994,9 @@ namespace CppSharp internal static extern void setTagName_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new HTMLEndTagComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new HTMLEndTagComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new HTMLEndTagComment((HTMLEndTagComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new HTMLEndTagComment((HTMLEndTagComment.Internal*) native, skipVTables); } public static HTMLEndTagComment __CreateInstance(HTMLEndTagComment.Internal native, bool skipVTables = false) @@ -12137,9 +12099,9 @@ namespace CppSharp internal static extern void setText_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new TextComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TextComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TextComment((TextComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TextComment((TextComment.Internal*) native, skipVTables); } public static TextComment __CreateInstance(TextComment.Internal native, bool skipVTables = false) @@ -12263,9 +12225,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static RawComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static RawComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new RawComment((RawComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new RawComment((RawComment.Internal*) native, skipVTables); } public static RawComment __CreateInstance(RawComment.Internal native, bool skipVTables = false) @@ -12320,8 +12282,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.RawComment __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); diff --git a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppParser.cs b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppParser.cs index 60f98d5f..1736f6a3 100644 --- a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppParser.cs +++ b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppParser.cs @@ -241,9 +241,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ParserOptions __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ParserOptions __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParserOptions((ParserOptions.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParserOptions((ParserOptions.Internal*) native, skipVTables); } public static ParserOptions __CreateInstance(ParserOptions.Internal native, bool skipVTables = false) @@ -298,8 +298,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ParserOptions __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -687,9 +685,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ParserDiagnostic __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ParserDiagnostic __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParserDiagnostic((ParserDiagnostic.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParserDiagnostic((ParserDiagnostic.Internal*) native, skipVTables); } public static ParserDiagnostic __CreateInstance(ParserDiagnostic.Internal native, bool skipVTables = false) @@ -744,8 +742,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ParserDiagnostic __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -886,9 +882,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ParserResult __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ParserResult __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParserResult((ParserResult.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParserResult((ParserResult.Internal*) native, skipVTables); } public static ParserResult __CreateInstance(ParserResult.Internal native, bool skipVTables = false) @@ -943,8 +939,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ParserResult __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -1065,9 +1059,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ClangParser __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ClangParser __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClangParser((ClangParser.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClangParser((ClangParser.Internal*) native, skipVTables); } public static ClangParser __CreateInstance(ClangParser.Internal native, bool skipVTables = false) @@ -1118,8 +1112,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ClangParser __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) diff --git a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Target.cs b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Target.cs index 0d8c5fe0..4e4895c4 100644 --- a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Target.cs +++ b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Target.cs @@ -178,9 +178,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ParserTargetInfo __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ParserTargetInfo __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParserTargetInfo((ParserTargetInfo.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParserTargetInfo((ParserTargetInfo.Internal*) native, skipVTables); } public static ParserTargetInfo __CreateInstance(ParserTargetInfo.Internal native, bool skipVTables = false) @@ -235,8 +235,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ParserTargetInfo __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); diff --git a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs index 3f6aa5de..1fbd09ba 100644 --- a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs +++ b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs @@ -274,9 +274,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Type __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Type __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Type((Type.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Type((Type.Internal*) native, skipVTables); } public static Type __CreateInstance(Type.Internal native, bool skipVTables = false) @@ -332,8 +332,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.Type __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -395,9 +393,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static TypeQualifiers __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static TypeQualifiers __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TypeQualifiers((TypeQualifiers.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TypeQualifiers((TypeQualifiers.Internal*) native, skipVTables); } public static TypeQualifiers __CreateInstance(TypeQualifiers.Internal native, bool skipVTables = false) @@ -448,8 +446,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.TypeQualifiers __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -526,9 +522,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static QualifiedType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static QualifiedType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new QualifiedType((QualifiedType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new QualifiedType((QualifiedType.Internal*) native, skipVTables); } public static QualifiedType __CreateInstance(QualifiedType.Internal native, bool skipVTables = false) @@ -580,8 +576,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.QualifiedType __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -645,9 +639,9 @@ namespace CppSharp internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new TagType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TagType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TagType((TagType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TagType((TagType.Internal*) native, skipVTables); } public static TagType __CreateInstance(TagType.Internal native, bool skipVTables = false) @@ -760,9 +754,9 @@ namespace CppSharp Incomplete = 3 } - public static new ArrayType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ArrayType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ArrayType((ArrayType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ArrayType((ArrayType.Internal*) native, skipVTables); } public static ArrayType __CreateInstance(ArrayType.Internal native, bool skipVTables = false) @@ -920,9 +914,9 @@ namespace CppSharp internal static extern uint getParametersCount_0(global::System.IntPtr instance); } - public static new FunctionType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new FunctionType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new FunctionType((FunctionType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new FunctionType((FunctionType.Internal*) native, skipVTables); } public static FunctionType __CreateInstance(FunctionType.Internal native, bool skipVTables = false) @@ -1070,9 +1064,9 @@ namespace CppSharp RVReference = 3 } - public static new PointerType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new PointerType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new PointerType((PointerType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new PointerType((PointerType.Internal*) native, skipVTables); } public static PointerType __CreateInstance(PointerType.Internal native, bool skipVTables = false) @@ -1176,9 +1170,9 @@ namespace CppSharp internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new MemberPointerType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new MemberPointerType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new MemberPointerType((MemberPointerType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new MemberPointerType((MemberPointerType.Internal*) native, skipVTables); } public static MemberPointerType __CreateInstance(MemberPointerType.Internal native, bool skipVTables = false) @@ -1269,9 +1263,9 @@ namespace CppSharp internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new TypedefType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TypedefType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TypedefType((TypedefType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TypedefType((TypedefType.Internal*) native, skipVTables); } public static TypedefType __CreateInstance(TypedefType.Internal native, bool skipVTables = false) @@ -1370,9 +1364,9 @@ namespace CppSharp internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new AttributedType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new AttributedType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new AttributedType((AttributedType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new AttributedType((AttributedType.Internal*) native, skipVTables); } public static AttributedType __CreateInstance(AttributedType.Internal native, bool skipVTables = false) @@ -1482,9 +1476,9 @@ namespace CppSharp internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new DecayedType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new DecayedType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new DecayedType((DecayedType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new DecayedType((DecayedType.Internal*) native, skipVTables); } public static DecayedType __CreateInstance(DecayedType.Internal native, bool skipVTables = false) @@ -1624,9 +1618,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static TemplateArgument __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static TemplateArgument __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateArgument((TemplateArgument.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateArgument((TemplateArgument.Internal*) native, skipVTables); } public static TemplateArgument __CreateInstance(TemplateArgument.Internal native, bool skipVTables = false) @@ -1678,8 +1672,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.TemplateArgument __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -1797,9 +1789,9 @@ namespace CppSharp internal static extern uint getArgumentsCount_0(global::System.IntPtr instance); } - public static new TemplateSpecializationType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TemplateSpecializationType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateSpecializationType((TemplateSpecializationType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateSpecializationType((TemplateSpecializationType.Internal*) native, skipVTables); } public static TemplateSpecializationType __CreateInstance(TemplateSpecializationType.Internal native, bool skipVTables = false) @@ -1965,9 +1957,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static TemplateParameter __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static TemplateParameter __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateParameter((TemplateParameter.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateParameter((TemplateParameter.Internal*) native, skipVTables); } public static TemplateParameter __CreateInstance(TemplateParameter.Internal native, bool skipVTables = false) @@ -2022,8 +2014,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.TemplateParameter __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); @@ -2129,9 +2119,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance, int delete); } - public static new TemplateParameterType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TemplateParameterType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateParameterType((TemplateParameterType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateParameterType((TemplateParameterType.Internal*) native, skipVTables); } public static TemplateParameterType __CreateInstance(TemplateParameterType.Internal native, bool skipVTables = false) @@ -2261,9 +2251,9 @@ namespace CppSharp internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new TemplateParameterSubstitutionType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TemplateParameterSubstitutionType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateParameterSubstitutionType((TemplateParameterSubstitutionType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateParameterSubstitutionType((TemplateParameterSubstitutionType.Internal*) native, skipVTables); } public static TemplateParameterSubstitutionType __CreateInstance(TemplateParameterSubstitutionType.Internal native, bool skipVTables = false) @@ -2357,9 +2347,9 @@ namespace CppSharp internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new InjectedClassNameType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new InjectedClassNameType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new InjectedClassNameType((InjectedClassNameType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new InjectedClassNameType((InjectedClassNameType.Internal*) native, skipVTables); } public static InjectedClassNameType __CreateInstance(InjectedClassNameType.Internal native, bool skipVTables = false) @@ -2470,9 +2460,9 @@ namespace CppSharp internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new DependentNameType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new DependentNameType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new DependentNameType((DependentNameType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new DependentNameType((DependentNameType.Internal*) native, skipVTables); } public static DependentNameType __CreateInstance(DependentNameType.Internal native, bool skipVTables = false) @@ -2547,9 +2537,9 @@ namespace CppSharp internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new PackExpansionType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new PackExpansionType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new PackExpansionType((PackExpansionType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new PackExpansionType((PackExpansionType.Internal*) native, skipVTables); } public static PackExpansionType __CreateInstance(PackExpansionType.Internal native, bool skipVTables = false) @@ -2627,9 +2617,9 @@ namespace CppSharp internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new BuiltinType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new BuiltinType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BuiltinType((BuiltinType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BuiltinType((BuiltinType.Internal*) native, skipVTables); } public static BuiltinType __CreateInstance(BuiltinType.Internal native, bool skipVTables = false) @@ -2728,9 +2718,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static VTableComponent __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static VTableComponent __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VTableComponent((VTableComponent.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VTableComponent((VTableComponent.Internal*) native, skipVTables); } public static VTableComponent __CreateInstance(VTableComponent.Internal native, bool skipVTables = false) @@ -2782,8 +2772,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.VTableComponent __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -2884,9 +2872,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static VTableLayout __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static VTableLayout __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VTableLayout((VTableLayout.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VTableLayout((VTableLayout.Internal*) native, skipVTables); } public static VTableLayout __CreateInstance(VTableLayout.Internal native, bool skipVTables = false) @@ -2941,8 +2929,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.VTableLayout __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); @@ -3021,9 +3007,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static VFTableInfo __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static VFTableInfo __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VFTableInfo((VFTableInfo.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VFTableInfo((VFTableInfo.Internal*) native, skipVTables); } public static VFTableInfo __CreateInstance(VFTableInfo.Internal native, bool skipVTables = false) @@ -3078,8 +3064,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.VFTableInfo __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); @@ -3210,9 +3194,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ClassLayout __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ClassLayout __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClassLayout((ClassLayout.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClassLayout((ClassLayout.Internal*) native, skipVTables); } public static ClassLayout __CreateInstance(ClassLayout.Internal native, bool skipVTables = false) @@ -3267,8 +3251,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.ClassLayout __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); @@ -3502,9 +3484,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Declaration __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Declaration __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Declaration((Declaration.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Declaration((Declaration.Internal*) native, skipVTables); } public static Declaration __CreateInstance(Declaration.Internal native, bool skipVTables = false) @@ -3560,8 +3542,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.Declaration __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); @@ -4026,9 +4006,9 @@ namespace CppSharp internal static extern uint getFriendsCount_0(global::System.IntPtr instance); } - public static new DeclarationContext __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new DeclarationContext __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new DeclarationContext((DeclarationContext.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new DeclarationContext((DeclarationContext.Internal*) native, skipVTables); } public static DeclarationContext __CreateInstance(DeclarationContext.Internal native, bool skipVTables = false) @@ -4419,9 +4399,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance, int delete); } - public static new TypedefDecl __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TypedefDecl __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TypedefDecl((TypedefDecl.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TypedefDecl((TypedefDecl.Internal*) native, skipVTables); } public static TypedefDecl __CreateInstance(TypedefDecl.Internal native, bool skipVTables = false) @@ -4547,9 +4527,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance, int delete); } - public static new Friend __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Friend __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Friend((Friend.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Friend((Friend.Internal*) native, skipVTables); } public static Friend __CreateInstance(Friend.Internal native, bool skipVTables = false) @@ -4660,9 +4640,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Statement __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Statement __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Statement((Statement.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Statement((Statement.Internal*) native, skipVTables); } public static Statement __CreateInstance(Statement.Internal native, bool skipVTables = false) @@ -4709,8 +4689,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.Statement __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); @@ -4788,9 +4766,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance, int delete); } - public static new Expression __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Expression __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Expression((Expression.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Expression((Expression.Internal*) native, skipVTables); } public static Expression __CreateInstance(Expression.Internal native, bool skipVTables = false) @@ -4872,9 +4850,9 @@ namespace CppSharp internal static extern void setOpcodeStr_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new BinaryOperator __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new BinaryOperator __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BinaryOperator((BinaryOperator.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BinaryOperator((BinaryOperator.Internal*) native, skipVTables); } public static BinaryOperator __CreateInstance(BinaryOperator.Internal native, bool skipVTables = false) @@ -5012,9 +4990,9 @@ namespace CppSharp internal static extern uint getArgumentsCount_0(global::System.IntPtr instance); } - public static new CallExpr __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new CallExpr __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new CallExpr((CallExpr.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new CallExpr((CallExpr.Internal*) native, skipVTables); } public static CallExpr __CreateInstance(CallExpr.Internal native, bool skipVTables = false) @@ -5133,9 +5111,9 @@ namespace CppSharp internal static extern uint getArgumentsCount_0(global::System.IntPtr instance); } - public static new CXXConstructExpr __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new CXXConstructExpr __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new CXXConstructExpr((CXXConstructExpr.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new CXXConstructExpr((CXXConstructExpr.Internal*) native, skipVTables); } public static CXXConstructExpr __CreateInstance(CXXConstructExpr.Internal native, bool skipVTables = false) @@ -5284,9 +5262,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance, int delete); } - public static new Parameter __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Parameter __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Parameter((Parameter.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Parameter((Parameter.Internal*) native, skipVTables); } public static Parameter __CreateInstance(Parameter.Internal native, bool skipVTables = false) @@ -5536,9 +5514,9 @@ namespace CppSharp internal static extern uint getParametersCount_0(global::System.IntPtr instance); } - public static new Function __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Function __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Function((Function.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Function((Function.Internal*) native, skipVTables); } public static Function __CreateInstance(Function.Internal native, bool skipVTables = false) @@ -5914,9 +5892,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance, int delete); } - public static new Method __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Method __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Method((Method.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Method((Method.Internal*) native, skipVTables); } public static Method __CreateInstance(Method.Internal native, bool skipVTables = false) @@ -6297,9 +6275,9 @@ namespace CppSharp internal static extern void setExpression_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new Item __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Item __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Item((Item.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Item((Item.Internal*) native, skipVTables); } public static Item __CreateInstance(Item.Internal native, bool skipVTables = false) @@ -6381,9 +6359,9 @@ namespace CppSharp } } - public static new Enumeration __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Enumeration __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Enumeration((Enumeration.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Enumeration((Enumeration.Internal*) native, skipVTables); } public static Enumeration __CreateInstance(Enumeration.Internal native, bool skipVTables = false) @@ -6584,9 +6562,9 @@ namespace CppSharp internal static extern void setMangled_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new Variable __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Variable __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Variable((Variable.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Variable((Variable.Internal*) native, skipVTables); } public static Variable __CreateInstance(Variable.Internal native, bool skipVTables = false) @@ -6704,9 +6682,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static BaseClassSpecifier __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static BaseClassSpecifier __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BaseClassSpecifier((BaseClassSpecifier.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BaseClassSpecifier((BaseClassSpecifier.Internal*) native, skipVTables); } public static BaseClassSpecifier __CreateInstance(BaseClassSpecifier.Internal native, bool skipVTables = false) @@ -6758,8 +6736,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.BaseClassSpecifier __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -6896,9 +6872,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance, int delete); } - public static new Field __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Field __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Field((Field.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Field((Field.Internal*) native, skipVTables); } public static Field __CreateInstance(Field.Internal native, bool skipVTables = false) @@ -7078,9 +7054,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance, int delete); } - public static new AccessSpecifierDecl __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new AccessSpecifierDecl __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new AccessSpecifierDecl((AccessSpecifierDecl.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new AccessSpecifierDecl((AccessSpecifierDecl.Internal*) native, skipVTables); } public static AccessSpecifierDecl __CreateInstance(AccessSpecifierDecl.Internal native, bool skipVTables = false) @@ -7303,9 +7279,9 @@ namespace CppSharp internal static extern uint getSpecifiersCount_0(global::System.IntPtr instance); } - public static new Class __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Class __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Class((Class.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Class((Class.Internal*) native, skipVTables); } public static Class __CreateInstance(Class.Internal native, bool skipVTables = false) @@ -7710,9 +7686,9 @@ namespace CppSharp internal static extern uint getParametersCount_0(global::System.IntPtr instance); } - public static new Template __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Template __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Template((Template.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Template((Template.Internal*) native, skipVTables); } public static Template __CreateInstance(Template.Internal native, bool skipVTables = false) @@ -7902,9 +7878,9 @@ namespace CppSharp internal static extern uint getSpecializationsCount_0(global::System.IntPtr instance); } - public static new ClassTemplate __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ClassTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClassTemplate((ClassTemplate.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClassTemplate((ClassTemplate.Internal*) native, skipVTables); } public static ClassTemplate __CreateInstance(ClassTemplate.Internal native, bool skipVTables = false) @@ -8106,9 +8082,9 @@ namespace CppSharp internal static extern uint getArgumentsCount_0(global::System.IntPtr instance); } - public static new ClassTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ClassTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClassTemplateSpecialization((ClassTemplateSpecialization.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClassTemplateSpecialization((ClassTemplateSpecialization.Internal*) native, skipVTables); } public static ClassTemplateSpecialization __CreateInstance(ClassTemplateSpecialization.Internal native, bool skipVTables = false) @@ -8317,9 +8293,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance, int delete); } - public static new ClassTemplatePartialSpecialization __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ClassTemplatePartialSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClassTemplatePartialSpecialization((ClassTemplatePartialSpecialization.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClassTemplatePartialSpecialization((ClassTemplatePartialSpecialization.Internal*) native, skipVTables); } public static ClassTemplatePartialSpecialization __CreateInstance(ClassTemplatePartialSpecialization.Internal native, bool skipVTables = false) @@ -8452,9 +8428,9 @@ namespace CppSharp internal static extern uint getSpecializationsCount_0(global::System.IntPtr instance); } - public static new FunctionTemplate __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new FunctionTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new FunctionTemplate((FunctionTemplate.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new FunctionTemplate((FunctionTemplate.Internal*) native, skipVTables); } public static FunctionTemplate __CreateInstance(FunctionTemplate.Internal native, bool skipVTables = false) @@ -8598,9 +8574,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static FunctionTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static FunctionTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new FunctionTemplateSpecialization((FunctionTemplateSpecialization.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new FunctionTemplateSpecialization((FunctionTemplateSpecialization.Internal*) native, skipVTables); } public static FunctionTemplateSpecialization __CreateInstance(FunctionTemplateSpecialization.Internal native, bool skipVTables = false) @@ -8655,8 +8631,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.FunctionTemplateSpecialization __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); @@ -8806,9 +8780,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance, int delete); } - public static new Namespace __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Namespace __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Namespace((Namespace.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Namespace((Namespace.Internal*) native, skipVTables); } public static Namespace __CreateInstance(Namespace.Internal native, bool skipVTables = false) @@ -8934,9 +8908,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance, int delete); } - public static new PreprocessedEntity __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new PreprocessedEntity __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new PreprocessedEntity((PreprocessedEntity.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new PreprocessedEntity((PreprocessedEntity.Internal*) native, skipVTables); } public static PreprocessedEntity __CreateInstance(PreprocessedEntity.Internal native, bool skipVTables = false) @@ -9072,9 +9046,9 @@ namespace CppSharp internal static extern void setExpression_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new MacroDefinition __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new MacroDefinition __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new MacroDefinition((MacroDefinition.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new MacroDefinition((MacroDefinition.Internal*) native, skipVTables); } public static MacroDefinition __CreateInstance(MacroDefinition.Internal native, bool skipVTables = false) @@ -9216,9 +9190,9 @@ namespace CppSharp internal static extern void setText_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new MacroExpansion __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new MacroExpansion __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new MacroExpansion((MacroExpansion.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new MacroExpansion((MacroExpansion.Internal*) native, skipVTables); } public static MacroExpansion __CreateInstance(MacroExpansion.Internal native, bool skipVTables = false) @@ -9401,9 +9375,9 @@ namespace CppSharp internal static extern uint getMacrosCount_0(global::System.IntPtr instance); } - public static new TranslationUnit __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TranslationUnit __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TranslationUnit((TranslationUnit.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TranslationUnit((TranslationUnit.Internal*) native, skipVTables); } public static TranslationUnit __CreateInstance(TranslationUnit.Internal native, bool skipVTables = false) @@ -9600,9 +9574,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static NativeLibrary __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static NativeLibrary __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new NativeLibrary((NativeLibrary.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new NativeLibrary((NativeLibrary.Internal*) native, skipVTables); } public static NativeLibrary __CreateInstance(NativeLibrary.Internal native, bool skipVTables = false) @@ -9657,8 +9631,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.NativeLibrary __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); @@ -9799,9 +9771,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ASTContext __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ASTContext __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ASTContext((ASTContext.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ASTContext((ASTContext.Internal*) native, skipVTables); } public static ASTContext __CreateInstance(ASTContext.Internal native, bool skipVTables = false) @@ -9856,8 +9828,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.ASTContext __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); @@ -9926,9 +9896,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Comment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Comment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Comment((Comment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Comment((Comment.Internal*) native, skipVTables); } public static Comment __CreateInstance(Comment.Internal native, bool skipVTables = false) @@ -9981,8 +9951,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.Comment __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -10027,9 +9995,9 @@ namespace CppSharp internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new BlockContentComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new BlockContentComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BlockContentComment((BlockContentComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BlockContentComment((BlockContentComment.Internal*) native, skipVTables); } public static BlockContentComment __CreateInstance(BlockContentComment.Internal native, bool skipVTables = false) @@ -10133,9 +10101,9 @@ namespace CppSharp internal static extern uint getBlocksCount_0(global::System.IntPtr instance); } - public static new FullComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new FullComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new FullComment((FullComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new FullComment((FullComment.Internal*) native, skipVTables); } public static FullComment __CreateInstance(FullComment.Internal native, bool skipVTables = false) @@ -10312,9 +10280,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Argument __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Argument __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Argument((Argument.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Argument((Argument.Internal*) native, skipVTables); } public static Argument __CreateInstance(Argument.Internal native, bool skipVTables = false) @@ -10369,8 +10337,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.BlockCommandComment.Argument __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); @@ -10395,9 +10361,9 @@ namespace CppSharp } } - public static new BlockCommandComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new BlockCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BlockCommandComment((BlockCommandComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BlockCommandComment((BlockCommandComment.Internal*) native, skipVTables); } public static BlockCommandComment __CreateInstance(BlockCommandComment.Internal native, bool skipVTables = false) @@ -10542,9 +10508,9 @@ namespace CppSharp InOut = 2 } - public static new ParamCommandComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ParamCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParamCommandComment((ParamCommandComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParamCommandComment((ParamCommandComment.Internal*) native, skipVTables); } public static ParamCommandComment __CreateInstance(ParamCommandComment.Internal native, bool skipVTables = false) @@ -10670,9 +10636,9 @@ namespace CppSharp internal static extern uint getPositionCount_0(global::System.IntPtr instance); } - public static new TParamCommandComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TParamCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TParamCommandComment((TParamCommandComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TParamCommandComment((TParamCommandComment.Internal*) native, skipVTables); } public static TParamCommandComment __CreateInstance(TParamCommandComment.Internal native, bool skipVTables = false) @@ -10788,9 +10754,9 @@ namespace CppSharp internal static extern void setText_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new VerbatimBlockLineComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new VerbatimBlockLineComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VerbatimBlockLineComment((VerbatimBlockLineComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VerbatimBlockLineComment((VerbatimBlockLineComment.Internal*) native, skipVTables); } public static VerbatimBlockLineComment __CreateInstance(VerbatimBlockLineComment.Internal native, bool skipVTables = false) @@ -10906,9 +10872,9 @@ namespace CppSharp internal static extern uint getLinesCount_0(global::System.IntPtr instance); } - public static new VerbatimBlockComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new VerbatimBlockComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VerbatimBlockComment((VerbatimBlockComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VerbatimBlockComment((VerbatimBlockComment.Internal*) native, skipVTables); } public static VerbatimBlockComment __CreateInstance(VerbatimBlockComment.Internal native, bool skipVTables = false) @@ -11031,9 +10997,9 @@ namespace CppSharp internal static extern void setText_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new VerbatimLineComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new VerbatimLineComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VerbatimLineComment((VerbatimLineComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VerbatimLineComment((VerbatimLineComment.Internal*) native, skipVTables); } public static VerbatimLineComment __CreateInstance(VerbatimLineComment.Internal native, bool skipVTables = false) @@ -11126,9 +11092,9 @@ namespace CppSharp internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new InlineContentComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new InlineContentComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new InlineContentComment((InlineContentComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new InlineContentComment((InlineContentComment.Internal*) native, skipVTables); } public static InlineContentComment __CreateInstance(InlineContentComment.Internal native, bool skipVTables = false) @@ -11235,9 +11201,9 @@ namespace CppSharp internal static extern uint getContentCount_0(global::System.IntPtr instance); } - public static new ParagraphComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ParagraphComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParagraphComment((ParagraphComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParagraphComment((ParagraphComment.Internal*) native, skipVTables); } public static ParagraphComment __CreateInstance(ParagraphComment.Internal native, bool skipVTables = false) @@ -11430,9 +11396,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Argument __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Argument __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Argument((Argument.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Argument((Argument.Internal*) native, skipVTables); } public static Argument __CreateInstance(Argument.Internal native, bool skipVTables = false) @@ -11487,8 +11453,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.InlineCommandComment.Argument __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); @@ -11513,9 +11477,9 @@ namespace CppSharp } } - public static new InlineCommandComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new InlineCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new InlineCommandComment((InlineCommandComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new InlineCommandComment((InlineCommandComment.Internal*) native, skipVTables); } public static InlineCommandComment __CreateInstance(InlineCommandComment.Internal native, bool skipVTables = false) @@ -11634,9 +11598,9 @@ namespace CppSharp internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new HTMLTagComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new HTMLTagComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new HTMLTagComment((HTMLTagComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new HTMLTagComment((HTMLTagComment.Internal*) native, skipVTables); } public static HTMLTagComment __CreateInstance(HTMLTagComment.Internal native, bool skipVTables = false) @@ -11799,9 +11763,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Attribute __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Attribute __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Attribute((Attribute.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Attribute((Attribute.Internal*) native, skipVTables); } public static Attribute __CreateInstance(Attribute.Internal native, bool skipVTables = false) @@ -11856,8 +11820,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.HTMLStartTagComment.Attribute __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); @@ -11898,9 +11860,9 @@ namespace CppSharp } } - public static new HTMLStartTagComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new HTMLStartTagComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new HTMLStartTagComment((HTMLStartTagComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new HTMLStartTagComment((HTMLStartTagComment.Internal*) native, skipVTables); } public static HTMLStartTagComment __CreateInstance(HTMLStartTagComment.Internal native, bool skipVTables = false) @@ -12032,9 +11994,9 @@ namespace CppSharp internal static extern void setTagName_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new HTMLEndTagComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new HTMLEndTagComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new HTMLEndTagComment((HTMLEndTagComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new HTMLEndTagComment((HTMLEndTagComment.Internal*) native, skipVTables); } public static HTMLEndTagComment __CreateInstance(HTMLEndTagComment.Internal native, bool skipVTables = false) @@ -12137,9 +12099,9 @@ namespace CppSharp internal static extern void setText_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new TextComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TextComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TextComment((TextComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TextComment((TextComment.Internal*) native, skipVTables); } public static TextComment __CreateInstance(TextComment.Internal native, bool skipVTables = false) @@ -12263,9 +12225,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static RawComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static RawComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new RawComment((RawComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new RawComment((RawComment.Internal*) native, skipVTables); } public static RawComment __CreateInstance(RawComment.Internal native, bool skipVTables = false) @@ -12320,8 +12282,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.RawComment __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); diff --git a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppParser.cs b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppParser.cs index d2695da1..c49166df 100644 --- a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppParser.cs +++ b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppParser.cs @@ -241,9 +241,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ParserOptions __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ParserOptions __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParserOptions((ParserOptions.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParserOptions((ParserOptions.Internal*) native, skipVTables); } public static ParserOptions __CreateInstance(ParserOptions.Internal native, bool skipVTables = false) @@ -298,8 +298,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ParserOptions __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); @@ -687,9 +685,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ParserDiagnostic __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ParserDiagnostic __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParserDiagnostic((ParserDiagnostic.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParserDiagnostic((ParserDiagnostic.Internal*) native, skipVTables); } public static ParserDiagnostic __CreateInstance(ParserDiagnostic.Internal native, bool skipVTables = false) @@ -744,8 +742,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ParserDiagnostic __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); @@ -886,9 +882,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ParserResult __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ParserResult __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParserResult((ParserResult.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParserResult((ParserResult.Internal*) native, skipVTables); } public static ParserResult __CreateInstance(ParserResult.Internal native, bool skipVTables = false) @@ -943,8 +939,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ParserResult __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); @@ -1065,9 +1059,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ClangParser __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ClangParser __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClangParser((ClangParser.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClangParser((ClangParser.Internal*) native, skipVTables); } public static ClangParser __CreateInstance(ClangParser.Internal native, bool skipVTables = false) @@ -1118,8 +1112,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ClangParser __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) diff --git a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Target.cs b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Target.cs index ed5537bb..17419d67 100644 --- a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Target.cs +++ b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Target.cs @@ -178,9 +178,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ParserTargetInfo __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ParserTargetInfo __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParserTargetInfo((ParserTargetInfo.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParserTargetInfo((ParserTargetInfo.Internal*) native, skipVTables); } public static ParserTargetInfo __CreateInstance(ParserTargetInfo.Internal native, bool skipVTables = false) @@ -235,8 +235,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ParserTargetInfo __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment), 0); diff --git a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs index 15e47f41..8fa01a8e 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs @@ -274,9 +274,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Type __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Type __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Type((Type.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Type((Type.Internal*) native, skipVTables); } public static Type __CreateInstance(Type.Internal native, bool skipVTables = false) @@ -332,8 +332,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.Type __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -395,9 +393,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static TypeQualifiers __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static TypeQualifiers __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TypeQualifiers((TypeQualifiers.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TypeQualifiers((TypeQualifiers.Internal*) native, skipVTables); } public static TypeQualifiers __CreateInstance(TypeQualifiers.Internal native, bool skipVTables = false) @@ -448,8 +446,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.TypeQualifiers __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -526,9 +522,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static QualifiedType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static QualifiedType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new QualifiedType((QualifiedType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new QualifiedType((QualifiedType.Internal*) native, skipVTables); } public static QualifiedType __CreateInstance(QualifiedType.Internal native, bool skipVTables = false) @@ -580,8 +576,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.QualifiedType __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -645,9 +639,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new TagType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TagType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TagType((TagType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TagType((TagType.Internal*) native, skipVTables); } public static TagType __CreateInstance(TagType.Internal native, bool skipVTables = false) @@ -760,9 +754,9 @@ namespace CppSharp Incomplete = 3 } - public static new ArrayType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ArrayType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ArrayType((ArrayType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ArrayType((ArrayType.Internal*) native, skipVTables); } public static ArrayType __CreateInstance(ArrayType.Internal native, bool skipVTables = false) @@ -920,9 +914,9 @@ namespace CppSharp internal static extern uint getParametersCount_0(global::System.IntPtr instance); } - public static new FunctionType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new FunctionType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new FunctionType((FunctionType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new FunctionType((FunctionType.Internal*) native, skipVTables); } public static FunctionType __CreateInstance(FunctionType.Internal native, bool skipVTables = false) @@ -1070,9 +1064,9 @@ namespace CppSharp RVReference = 3 } - public static new PointerType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new PointerType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new PointerType((PointerType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new PointerType((PointerType.Internal*) native, skipVTables); } public static PointerType __CreateInstance(PointerType.Internal native, bool skipVTables = false) @@ -1176,9 +1170,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new MemberPointerType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new MemberPointerType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new MemberPointerType((MemberPointerType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new MemberPointerType((MemberPointerType.Internal*) native, skipVTables); } public static MemberPointerType __CreateInstance(MemberPointerType.Internal native, bool skipVTables = false) @@ -1269,9 +1263,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new TypedefType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TypedefType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TypedefType((TypedefType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TypedefType((TypedefType.Internal*) native, skipVTables); } public static TypedefType __CreateInstance(TypedefType.Internal native, bool skipVTables = false) @@ -1370,9 +1364,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new AttributedType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new AttributedType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new AttributedType((AttributedType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new AttributedType((AttributedType.Internal*) native, skipVTables); } public static AttributedType __CreateInstance(AttributedType.Internal native, bool skipVTables = false) @@ -1482,9 +1476,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new DecayedType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new DecayedType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new DecayedType((DecayedType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new DecayedType((DecayedType.Internal*) native, skipVTables); } public static DecayedType __CreateInstance(DecayedType.Internal native, bool skipVTables = false) @@ -1624,9 +1618,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static TemplateArgument __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static TemplateArgument __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateArgument((TemplateArgument.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateArgument((TemplateArgument.Internal*) native, skipVTables); } public static TemplateArgument __CreateInstance(TemplateArgument.Internal native, bool skipVTables = false) @@ -1678,8 +1672,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.TemplateArgument __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -1797,9 +1789,9 @@ namespace CppSharp internal static extern uint getArgumentsCount_0(global::System.IntPtr instance); } - public static new TemplateSpecializationType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TemplateSpecializationType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateSpecializationType((TemplateSpecializationType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateSpecializationType((TemplateSpecializationType.Internal*) native, skipVTables); } public static TemplateSpecializationType __CreateInstance(TemplateSpecializationType.Internal native, bool skipVTables = false) @@ -1965,9 +1957,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static TemplateParameter __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static TemplateParameter __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateParameter((TemplateParameter.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateParameter((TemplateParameter.Internal*) native, skipVTables); } public static TemplateParameter __CreateInstance(TemplateParameter.Internal native, bool skipVTables = false) @@ -2022,8 +2014,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.TemplateParameter __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -2129,9 +2119,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new TemplateParameterType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TemplateParameterType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateParameterType((TemplateParameterType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateParameterType((TemplateParameterType.Internal*) native, skipVTables); } public static TemplateParameterType __CreateInstance(TemplateParameterType.Internal native, bool skipVTables = false) @@ -2261,9 +2251,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new TemplateParameterSubstitutionType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TemplateParameterSubstitutionType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateParameterSubstitutionType((TemplateParameterSubstitutionType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateParameterSubstitutionType((TemplateParameterSubstitutionType.Internal*) native, skipVTables); } public static TemplateParameterSubstitutionType __CreateInstance(TemplateParameterSubstitutionType.Internal native, bool skipVTables = false) @@ -2357,9 +2347,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new InjectedClassNameType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new InjectedClassNameType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new InjectedClassNameType((InjectedClassNameType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new InjectedClassNameType((InjectedClassNameType.Internal*) native, skipVTables); } public static InjectedClassNameType __CreateInstance(InjectedClassNameType.Internal native, bool skipVTables = false) @@ -2470,9 +2460,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new DependentNameType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new DependentNameType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new DependentNameType((DependentNameType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new DependentNameType((DependentNameType.Internal*) native, skipVTables); } public static DependentNameType __CreateInstance(DependentNameType.Internal native, bool skipVTables = false) @@ -2547,9 +2537,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new PackExpansionType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new PackExpansionType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new PackExpansionType((PackExpansionType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new PackExpansionType((PackExpansionType.Internal*) native, skipVTables); } public static PackExpansionType __CreateInstance(PackExpansionType.Internal native, bool skipVTables = false) @@ -2627,9 +2617,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new BuiltinType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new BuiltinType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BuiltinType((BuiltinType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BuiltinType((BuiltinType.Internal*) native, skipVTables); } public static BuiltinType __CreateInstance(BuiltinType.Internal native, bool skipVTables = false) @@ -2728,9 +2718,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static VTableComponent __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static VTableComponent __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VTableComponent((VTableComponent.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VTableComponent((VTableComponent.Internal*) native, skipVTables); } public static VTableComponent __CreateInstance(VTableComponent.Internal native, bool skipVTables = false) @@ -2782,8 +2772,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.VTableComponent __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -2884,9 +2872,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static VTableLayout __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static VTableLayout __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VTableLayout((VTableLayout.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VTableLayout((VTableLayout.Internal*) native, skipVTables); } public static VTableLayout __CreateInstance(VTableLayout.Internal native, bool skipVTables = false) @@ -2941,8 +2929,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.VTableLayout __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -3020,9 +3006,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static VFTableInfo __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static VFTableInfo __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VFTableInfo((VFTableInfo.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VFTableInfo((VFTableInfo.Internal*) native, skipVTables); } public static VFTableInfo __CreateInstance(VFTableInfo.Internal native, bool skipVTables = false) @@ -3077,8 +3063,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.VFTableInfo __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -3209,9 +3193,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ClassLayout __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ClassLayout __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClassLayout((ClassLayout.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClassLayout((ClassLayout.Internal*) native, skipVTables); } public static ClassLayout __CreateInstance(ClassLayout.Internal native, bool skipVTables = false) @@ -3266,8 +3250,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.ClassLayout __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -3501,9 +3483,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Declaration __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Declaration __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Declaration((Declaration.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Declaration((Declaration.Internal*) native, skipVTables); } public static Declaration __CreateInstance(Declaration.Internal native, bool skipVTables = false) @@ -3559,8 +3541,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.Declaration __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -4025,9 +4005,9 @@ namespace CppSharp internal static extern uint getFriendsCount_0(global::System.IntPtr instance); } - public static new DeclarationContext __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new DeclarationContext __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new DeclarationContext((DeclarationContext.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new DeclarationContext((DeclarationContext.Internal*) native, skipVTables); } public static DeclarationContext __CreateInstance(DeclarationContext.Internal native, bool skipVTables = false) @@ -4418,9 +4398,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new TypedefDecl __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TypedefDecl __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TypedefDecl((TypedefDecl.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TypedefDecl((TypedefDecl.Internal*) native, skipVTables); } public static TypedefDecl __CreateInstance(TypedefDecl.Internal native, bool skipVTables = false) @@ -4546,9 +4526,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Friend __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Friend __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Friend((Friend.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Friend((Friend.Internal*) native, skipVTables); } public static Friend __CreateInstance(Friend.Internal native, bool skipVTables = false) @@ -4659,9 +4639,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Statement __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Statement __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Statement((Statement.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Statement((Statement.Internal*) native, skipVTables); } public static Statement __CreateInstance(Statement.Internal native, bool skipVTables = false) @@ -4708,8 +4688,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.Statement __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -4787,9 +4765,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Expression __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Expression __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Expression((Expression.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Expression((Expression.Internal*) native, skipVTables); } public static Expression __CreateInstance(Expression.Internal native, bool skipVTables = false) @@ -4871,9 +4849,9 @@ namespace CppSharp internal static extern void setOpcodeStr_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new BinaryOperator __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new BinaryOperator __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BinaryOperator((BinaryOperator.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BinaryOperator((BinaryOperator.Internal*) native, skipVTables); } public static BinaryOperator __CreateInstance(BinaryOperator.Internal native, bool skipVTables = false) @@ -5011,9 +4989,9 @@ namespace CppSharp internal static extern uint getArgumentsCount_0(global::System.IntPtr instance); } - public static new CallExpr __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new CallExpr __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new CallExpr((CallExpr.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new CallExpr((CallExpr.Internal*) native, skipVTables); } public static CallExpr __CreateInstance(CallExpr.Internal native, bool skipVTables = false) @@ -5132,9 +5110,9 @@ namespace CppSharp internal static extern uint getArgumentsCount_0(global::System.IntPtr instance); } - public static new CXXConstructExpr __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new CXXConstructExpr __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new CXXConstructExpr((CXXConstructExpr.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new CXXConstructExpr((CXXConstructExpr.Internal*) native, skipVTables); } public static CXXConstructExpr __CreateInstance(CXXConstructExpr.Internal native, bool skipVTables = false) @@ -5283,9 +5261,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Parameter __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Parameter __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Parameter((Parameter.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Parameter((Parameter.Internal*) native, skipVTables); } public static Parameter __CreateInstance(Parameter.Internal native, bool skipVTables = false) @@ -5535,9 +5513,9 @@ namespace CppSharp internal static extern uint getParametersCount_0(global::System.IntPtr instance); } - public static new Function __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Function __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Function((Function.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Function((Function.Internal*) native, skipVTables); } public static Function __CreateInstance(Function.Internal native, bool skipVTables = false) @@ -5913,9 +5891,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Method __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Method __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Method((Method.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Method((Method.Internal*) native, skipVTables); } public static Method __CreateInstance(Method.Internal native, bool skipVTables = false) @@ -6296,9 +6274,9 @@ namespace CppSharp internal static extern void setExpression_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new Item __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Item __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Item((Item.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Item((Item.Internal*) native, skipVTables); } public static Item __CreateInstance(Item.Internal native, bool skipVTables = false) @@ -6380,9 +6358,9 @@ namespace CppSharp } } - public static new Enumeration __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Enumeration __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Enumeration((Enumeration.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Enumeration((Enumeration.Internal*) native, skipVTables); } public static Enumeration __CreateInstance(Enumeration.Internal native, bool skipVTables = false) @@ -6583,9 +6561,9 @@ namespace CppSharp internal static extern void setMangled_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new Variable __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Variable __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Variable((Variable.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Variable((Variable.Internal*) native, skipVTables); } public static Variable __CreateInstance(Variable.Internal native, bool skipVTables = false) @@ -6703,9 +6681,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static BaseClassSpecifier __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static BaseClassSpecifier __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BaseClassSpecifier((BaseClassSpecifier.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BaseClassSpecifier((BaseClassSpecifier.Internal*) native, skipVTables); } public static BaseClassSpecifier __CreateInstance(BaseClassSpecifier.Internal native, bool skipVTables = false) @@ -6757,8 +6735,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.BaseClassSpecifier __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -6895,9 +6871,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Field __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Field __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Field((Field.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Field((Field.Internal*) native, skipVTables); } public static Field __CreateInstance(Field.Internal native, bool skipVTables = false) @@ -7077,9 +7053,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new AccessSpecifierDecl __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new AccessSpecifierDecl __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new AccessSpecifierDecl((AccessSpecifierDecl.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new AccessSpecifierDecl((AccessSpecifierDecl.Internal*) native, skipVTables); } public static AccessSpecifierDecl __CreateInstance(AccessSpecifierDecl.Internal native, bool skipVTables = false) @@ -7302,9 +7278,9 @@ namespace CppSharp internal static extern uint getSpecifiersCount_0(global::System.IntPtr instance); } - public static new Class __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Class __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Class((Class.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Class((Class.Internal*) native, skipVTables); } public static Class __CreateInstance(Class.Internal native, bool skipVTables = false) @@ -7709,9 +7685,9 @@ namespace CppSharp internal static extern uint getParametersCount_0(global::System.IntPtr instance); } - public static new Template __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Template __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Template((Template.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Template((Template.Internal*) native, skipVTables); } public static Template __CreateInstance(Template.Internal native, bool skipVTables = false) @@ -7901,9 +7877,9 @@ namespace CppSharp internal static extern uint getSpecializationsCount_0(global::System.IntPtr instance); } - public static new ClassTemplate __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ClassTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClassTemplate((ClassTemplate.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClassTemplate((ClassTemplate.Internal*) native, skipVTables); } public static ClassTemplate __CreateInstance(ClassTemplate.Internal native, bool skipVTables = false) @@ -8105,9 +8081,9 @@ namespace CppSharp internal static extern uint getArgumentsCount_0(global::System.IntPtr instance); } - public static new ClassTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ClassTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClassTemplateSpecialization((ClassTemplateSpecialization.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClassTemplateSpecialization((ClassTemplateSpecialization.Internal*) native, skipVTables); } public static ClassTemplateSpecialization __CreateInstance(ClassTemplateSpecialization.Internal native, bool skipVTables = false) @@ -8316,9 +8292,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new ClassTemplatePartialSpecialization __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ClassTemplatePartialSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClassTemplatePartialSpecialization((ClassTemplatePartialSpecialization.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClassTemplatePartialSpecialization((ClassTemplatePartialSpecialization.Internal*) native, skipVTables); } public static ClassTemplatePartialSpecialization __CreateInstance(ClassTemplatePartialSpecialization.Internal native, bool skipVTables = false) @@ -8451,9 +8427,9 @@ namespace CppSharp internal static extern uint getSpecializationsCount_0(global::System.IntPtr instance); } - public static new FunctionTemplate __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new FunctionTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new FunctionTemplate((FunctionTemplate.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new FunctionTemplate((FunctionTemplate.Internal*) native, skipVTables); } public static FunctionTemplate __CreateInstance(FunctionTemplate.Internal native, bool skipVTables = false) @@ -8597,9 +8573,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static FunctionTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static FunctionTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new FunctionTemplateSpecialization((FunctionTemplateSpecialization.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new FunctionTemplateSpecialization((FunctionTemplateSpecialization.Internal*) native, skipVTables); } public static FunctionTemplateSpecialization __CreateInstance(FunctionTemplateSpecialization.Internal native, bool skipVTables = false) @@ -8654,8 +8630,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.FunctionTemplateSpecialization __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -8805,9 +8779,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Namespace __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Namespace __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Namespace((Namespace.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Namespace((Namespace.Internal*) native, skipVTables); } public static Namespace __CreateInstance(Namespace.Internal native, bool skipVTables = false) @@ -8933,9 +8907,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new PreprocessedEntity __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new PreprocessedEntity __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new PreprocessedEntity((PreprocessedEntity.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new PreprocessedEntity((PreprocessedEntity.Internal*) native, skipVTables); } public static PreprocessedEntity __CreateInstance(PreprocessedEntity.Internal native, bool skipVTables = false) @@ -9071,9 +9045,9 @@ namespace CppSharp internal static extern void setExpression_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new MacroDefinition __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new MacroDefinition __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new MacroDefinition((MacroDefinition.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new MacroDefinition((MacroDefinition.Internal*) native, skipVTables); } public static MacroDefinition __CreateInstance(MacroDefinition.Internal native, bool skipVTables = false) @@ -9215,9 +9189,9 @@ namespace CppSharp internal static extern void setText_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new MacroExpansion __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new MacroExpansion __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new MacroExpansion((MacroExpansion.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new MacroExpansion((MacroExpansion.Internal*) native, skipVTables); } public static MacroExpansion __CreateInstance(MacroExpansion.Internal native, bool skipVTables = false) @@ -9400,9 +9374,9 @@ namespace CppSharp internal static extern uint getMacrosCount_0(global::System.IntPtr instance); } - public static new TranslationUnit __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TranslationUnit __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TranslationUnit((TranslationUnit.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TranslationUnit((TranslationUnit.Internal*) native, skipVTables); } public static TranslationUnit __CreateInstance(TranslationUnit.Internal native, bool skipVTables = false) @@ -9599,9 +9573,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static NativeLibrary __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static NativeLibrary __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new NativeLibrary((NativeLibrary.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new NativeLibrary((NativeLibrary.Internal*) native, skipVTables); } public static NativeLibrary __CreateInstance(NativeLibrary.Internal native, bool skipVTables = false) @@ -9656,8 +9630,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.NativeLibrary __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -9798,9 +9770,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ASTContext __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ASTContext __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ASTContext((ASTContext.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ASTContext((ASTContext.Internal*) native, skipVTables); } public static ASTContext __CreateInstance(ASTContext.Internal native, bool skipVTables = false) @@ -9855,8 +9827,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.ASTContext __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -9925,9 +9895,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Comment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Comment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Comment((Comment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Comment((Comment.Internal*) native, skipVTables); } public static Comment __CreateInstance(Comment.Internal native, bool skipVTables = false) @@ -9980,8 +9950,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.Comment __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -10026,9 +9994,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new BlockContentComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new BlockContentComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BlockContentComment((BlockContentComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BlockContentComment((BlockContentComment.Internal*) native, skipVTables); } public static BlockContentComment __CreateInstance(BlockContentComment.Internal native, bool skipVTables = false) @@ -10132,9 +10100,9 @@ namespace CppSharp internal static extern uint getBlocksCount_0(global::System.IntPtr instance); } - public static new FullComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new FullComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new FullComment((FullComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new FullComment((FullComment.Internal*) native, skipVTables); } public static FullComment __CreateInstance(FullComment.Internal native, bool skipVTables = false) @@ -10311,9 +10279,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Argument __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Argument __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Argument((Argument.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Argument((Argument.Internal*) native, skipVTables); } public static Argument __CreateInstance(Argument.Internal native, bool skipVTables = false) @@ -10368,8 +10336,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.BlockCommandComment.Argument __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -10394,9 +10360,9 @@ namespace CppSharp } } - public static new BlockCommandComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new BlockCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BlockCommandComment((BlockCommandComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BlockCommandComment((BlockCommandComment.Internal*) native, skipVTables); } public static BlockCommandComment __CreateInstance(BlockCommandComment.Internal native, bool skipVTables = false) @@ -10541,9 +10507,9 @@ namespace CppSharp InOut = 2 } - public static new ParamCommandComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ParamCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParamCommandComment((ParamCommandComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParamCommandComment((ParamCommandComment.Internal*) native, skipVTables); } public static ParamCommandComment __CreateInstance(ParamCommandComment.Internal native, bool skipVTables = false) @@ -10669,9 +10635,9 @@ namespace CppSharp internal static extern uint getPositionCount_0(global::System.IntPtr instance); } - public static new TParamCommandComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TParamCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TParamCommandComment((TParamCommandComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TParamCommandComment((TParamCommandComment.Internal*) native, skipVTables); } public static TParamCommandComment __CreateInstance(TParamCommandComment.Internal native, bool skipVTables = false) @@ -10787,9 +10753,9 @@ namespace CppSharp internal static extern void setText_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new VerbatimBlockLineComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new VerbatimBlockLineComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VerbatimBlockLineComment((VerbatimBlockLineComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VerbatimBlockLineComment((VerbatimBlockLineComment.Internal*) native, skipVTables); } public static VerbatimBlockLineComment __CreateInstance(VerbatimBlockLineComment.Internal native, bool skipVTables = false) @@ -10905,9 +10871,9 @@ namespace CppSharp internal static extern uint getLinesCount_0(global::System.IntPtr instance); } - public static new VerbatimBlockComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new VerbatimBlockComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VerbatimBlockComment((VerbatimBlockComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VerbatimBlockComment((VerbatimBlockComment.Internal*) native, skipVTables); } public static VerbatimBlockComment __CreateInstance(VerbatimBlockComment.Internal native, bool skipVTables = false) @@ -11030,9 +10996,9 @@ namespace CppSharp internal static extern void setText_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new VerbatimLineComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new VerbatimLineComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VerbatimLineComment((VerbatimLineComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VerbatimLineComment((VerbatimLineComment.Internal*) native, skipVTables); } public static VerbatimLineComment __CreateInstance(VerbatimLineComment.Internal native, bool skipVTables = false) @@ -11125,9 +11091,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new InlineContentComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new InlineContentComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new InlineContentComment((InlineContentComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new InlineContentComment((InlineContentComment.Internal*) native, skipVTables); } public static InlineContentComment __CreateInstance(InlineContentComment.Internal native, bool skipVTables = false) @@ -11234,9 +11200,9 @@ namespace CppSharp internal static extern uint getContentCount_0(global::System.IntPtr instance); } - public static new ParagraphComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ParagraphComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParagraphComment((ParagraphComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParagraphComment((ParagraphComment.Internal*) native, skipVTables); } public static ParagraphComment __CreateInstance(ParagraphComment.Internal native, bool skipVTables = false) @@ -11429,9 +11395,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Argument __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Argument __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Argument((Argument.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Argument((Argument.Internal*) native, skipVTables); } public static Argument __CreateInstance(Argument.Internal native, bool skipVTables = false) @@ -11486,8 +11452,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.InlineCommandComment.Argument __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -11512,9 +11476,9 @@ namespace CppSharp } } - public static new InlineCommandComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new InlineCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new InlineCommandComment((InlineCommandComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new InlineCommandComment((InlineCommandComment.Internal*) native, skipVTables); } public static InlineCommandComment __CreateInstance(InlineCommandComment.Internal native, bool skipVTables = false) @@ -11633,9 +11597,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new HTMLTagComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new HTMLTagComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new HTMLTagComment((HTMLTagComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new HTMLTagComment((HTMLTagComment.Internal*) native, skipVTables); } public static HTMLTagComment __CreateInstance(HTMLTagComment.Internal native, bool skipVTables = false) @@ -11798,9 +11762,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Attribute __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Attribute __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Attribute((Attribute.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Attribute((Attribute.Internal*) native, skipVTables); } public static Attribute __CreateInstance(Attribute.Internal native, bool skipVTables = false) @@ -11855,8 +11819,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.HTMLStartTagComment.Attribute __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -11897,9 +11859,9 @@ namespace CppSharp } } - public static new HTMLStartTagComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new HTMLStartTagComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new HTMLStartTagComment((HTMLStartTagComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new HTMLStartTagComment((HTMLStartTagComment.Internal*) native, skipVTables); } public static HTMLStartTagComment __CreateInstance(HTMLStartTagComment.Internal native, bool skipVTables = false) @@ -12031,9 +11993,9 @@ namespace CppSharp internal static extern void setTagName_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new HTMLEndTagComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new HTMLEndTagComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new HTMLEndTagComment((HTMLEndTagComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new HTMLEndTagComment((HTMLEndTagComment.Internal*) native, skipVTables); } public static HTMLEndTagComment __CreateInstance(HTMLEndTagComment.Internal native, bool skipVTables = false) @@ -12136,9 +12098,9 @@ namespace CppSharp internal static extern void setText_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new TextComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TextComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TextComment((TextComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TextComment((TextComment.Internal*) native, skipVTables); } public static TextComment __CreateInstance(TextComment.Internal native, bool skipVTables = false) @@ -12262,9 +12224,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static RawComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static RawComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new RawComment((RawComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new RawComment((RawComment.Internal*) native, skipVTables); } public static RawComment __CreateInstance(RawComment.Internal native, bool skipVTables = false) @@ -12319,8 +12281,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.RawComment __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); diff --git a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppParser.cs index c52af50c..65f7a8fd 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppParser.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppParser.cs @@ -241,9 +241,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ParserOptions __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ParserOptions __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParserOptions((ParserOptions.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParserOptions((ParserOptions.Internal*) native, skipVTables); } public static ParserOptions __CreateInstance(ParserOptions.Internal native, bool skipVTables = false) @@ -298,8 +298,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ParserOptions __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -687,9 +685,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ParserDiagnostic __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ParserDiagnostic __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParserDiagnostic((ParserDiagnostic.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParserDiagnostic((ParserDiagnostic.Internal*) native, skipVTables); } public static ParserDiagnostic __CreateInstance(ParserDiagnostic.Internal native, bool skipVTables = false) @@ -744,8 +742,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ParserDiagnostic __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -886,9 +882,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ParserResult __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ParserResult __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParserResult((ParserResult.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParserResult((ParserResult.Internal*) native, skipVTables); } public static ParserResult __CreateInstance(ParserResult.Internal native, bool skipVTables = false) @@ -943,8 +939,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ParserResult __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -1065,9 +1059,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ClangParser __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ClangParser __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClangParser((ClangParser.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClangParser((ClangParser.Internal*) native, skipVTables); } public static ClangParser __CreateInstance(ClangParser.Internal native, bool skipVTables = false) @@ -1118,8 +1112,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ClangParser __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) diff --git a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Target.cs b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Target.cs index 540ee9dd..4ed5c20c 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Target.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Target.cs @@ -178,9 +178,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ParserTargetInfo __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ParserTargetInfo __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParserTargetInfo((ParserTargetInfo.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParserTargetInfo((ParserTargetInfo.Internal*) native, skipVTables); } public static ParserTargetInfo __CreateInstance(ParserTargetInfo.Internal native, bool skipVTables = false) @@ -235,8 +235,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ParserTargetInfo __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs index ffe6abdc..f6943e72 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs @@ -274,9 +274,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Type __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Type __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Type((Type.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Type((Type.Internal*) native, skipVTables); } public static Type __CreateInstance(Type.Internal native, bool skipVTables = false) @@ -332,8 +332,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.Type __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -395,9 +393,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static TypeQualifiers __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static TypeQualifiers __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TypeQualifiers((TypeQualifiers.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TypeQualifiers((TypeQualifiers.Internal*) native, skipVTables); } public static TypeQualifiers __CreateInstance(TypeQualifiers.Internal native, bool skipVTables = false) @@ -448,8 +446,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.TypeQualifiers __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -526,9 +522,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static QualifiedType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static QualifiedType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new QualifiedType((QualifiedType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new QualifiedType((QualifiedType.Internal*) native, skipVTables); } public static QualifiedType __CreateInstance(QualifiedType.Internal native, bool skipVTables = false) @@ -580,8 +576,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.QualifiedType __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -645,9 +639,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new TagType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TagType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TagType((TagType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TagType((TagType.Internal*) native, skipVTables); } public static TagType __CreateInstance(TagType.Internal native, bool skipVTables = false) @@ -760,9 +754,9 @@ namespace CppSharp Incomplete = 3 } - public static new ArrayType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ArrayType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ArrayType((ArrayType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ArrayType((ArrayType.Internal*) native, skipVTables); } public static ArrayType __CreateInstance(ArrayType.Internal native, bool skipVTables = false) @@ -920,9 +914,9 @@ namespace CppSharp internal static extern uint getParametersCount_0(global::System.IntPtr instance); } - public static new FunctionType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new FunctionType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new FunctionType((FunctionType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new FunctionType((FunctionType.Internal*) native, skipVTables); } public static FunctionType __CreateInstance(FunctionType.Internal native, bool skipVTables = false) @@ -1070,9 +1064,9 @@ namespace CppSharp RVReference = 3 } - public static new PointerType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new PointerType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new PointerType((PointerType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new PointerType((PointerType.Internal*) native, skipVTables); } public static PointerType __CreateInstance(PointerType.Internal native, bool skipVTables = false) @@ -1176,9 +1170,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new MemberPointerType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new MemberPointerType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new MemberPointerType((MemberPointerType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new MemberPointerType((MemberPointerType.Internal*) native, skipVTables); } public static MemberPointerType __CreateInstance(MemberPointerType.Internal native, bool skipVTables = false) @@ -1269,9 +1263,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new TypedefType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TypedefType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TypedefType((TypedefType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TypedefType((TypedefType.Internal*) native, skipVTables); } public static TypedefType __CreateInstance(TypedefType.Internal native, bool skipVTables = false) @@ -1370,9 +1364,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new AttributedType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new AttributedType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new AttributedType((AttributedType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new AttributedType((AttributedType.Internal*) native, skipVTables); } public static AttributedType __CreateInstance(AttributedType.Internal native, bool skipVTables = false) @@ -1482,9 +1476,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new DecayedType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new DecayedType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new DecayedType((DecayedType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new DecayedType((DecayedType.Internal*) native, skipVTables); } public static DecayedType __CreateInstance(DecayedType.Internal native, bool skipVTables = false) @@ -1624,9 +1618,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static TemplateArgument __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static TemplateArgument __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateArgument((TemplateArgument.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateArgument((TemplateArgument.Internal*) native, skipVTables); } public static TemplateArgument __CreateInstance(TemplateArgument.Internal native, bool skipVTables = false) @@ -1678,8 +1672,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.TemplateArgument __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -1797,9 +1789,9 @@ namespace CppSharp internal static extern uint getArgumentsCount_0(global::System.IntPtr instance); } - public static new TemplateSpecializationType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TemplateSpecializationType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateSpecializationType((TemplateSpecializationType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateSpecializationType((TemplateSpecializationType.Internal*) native, skipVTables); } public static TemplateSpecializationType __CreateInstance(TemplateSpecializationType.Internal native, bool skipVTables = false) @@ -1965,9 +1957,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static TemplateParameter __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static TemplateParameter __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateParameter((TemplateParameter.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateParameter((TemplateParameter.Internal*) native, skipVTables); } public static TemplateParameter __CreateInstance(TemplateParameter.Internal native, bool skipVTables = false) @@ -2022,8 +2014,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.TemplateParameter __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -2129,9 +2119,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new TemplateParameterType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TemplateParameterType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateParameterType((TemplateParameterType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateParameterType((TemplateParameterType.Internal*) native, skipVTables); } public static TemplateParameterType __CreateInstance(TemplateParameterType.Internal native, bool skipVTables = false) @@ -2261,9 +2251,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new TemplateParameterSubstitutionType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TemplateParameterSubstitutionType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TemplateParameterSubstitutionType((TemplateParameterSubstitutionType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TemplateParameterSubstitutionType((TemplateParameterSubstitutionType.Internal*) native, skipVTables); } public static TemplateParameterSubstitutionType __CreateInstance(TemplateParameterSubstitutionType.Internal native, bool skipVTables = false) @@ -2357,9 +2347,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new InjectedClassNameType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new InjectedClassNameType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new InjectedClassNameType((InjectedClassNameType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new InjectedClassNameType((InjectedClassNameType.Internal*) native, skipVTables); } public static InjectedClassNameType __CreateInstance(InjectedClassNameType.Internal native, bool skipVTables = false) @@ -2470,9 +2460,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new DependentNameType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new DependentNameType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new DependentNameType((DependentNameType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new DependentNameType((DependentNameType.Internal*) native, skipVTables); } public static DependentNameType __CreateInstance(DependentNameType.Internal native, bool skipVTables = false) @@ -2547,9 +2537,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new PackExpansionType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new PackExpansionType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new PackExpansionType((PackExpansionType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new PackExpansionType((PackExpansionType.Internal*) native, skipVTables); } public static PackExpansionType __CreateInstance(PackExpansionType.Internal native, bool skipVTables = false) @@ -2627,9 +2617,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new BuiltinType __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new BuiltinType __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BuiltinType((BuiltinType.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BuiltinType((BuiltinType.Internal*) native, skipVTables); } public static BuiltinType __CreateInstance(BuiltinType.Internal native, bool skipVTables = false) @@ -2728,9 +2718,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static VTableComponent __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static VTableComponent __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VTableComponent((VTableComponent.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VTableComponent((VTableComponent.Internal*) native, skipVTables); } public static VTableComponent __CreateInstance(VTableComponent.Internal native, bool skipVTables = false) @@ -2782,8 +2772,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.VTableComponent __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -2884,9 +2872,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static VTableLayout __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static VTableLayout __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VTableLayout((VTableLayout.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VTableLayout((VTableLayout.Internal*) native, skipVTables); } public static VTableLayout __CreateInstance(VTableLayout.Internal native, bool skipVTables = false) @@ -2941,8 +2929,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.VTableLayout __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -3020,9 +3006,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static VFTableInfo __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static VFTableInfo __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VFTableInfo((VFTableInfo.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VFTableInfo((VFTableInfo.Internal*) native, skipVTables); } public static VFTableInfo __CreateInstance(VFTableInfo.Internal native, bool skipVTables = false) @@ -3077,8 +3063,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.VFTableInfo __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -3209,9 +3193,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ClassLayout __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ClassLayout __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClassLayout((ClassLayout.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClassLayout((ClassLayout.Internal*) native, skipVTables); } public static ClassLayout __CreateInstance(ClassLayout.Internal native, bool skipVTables = false) @@ -3266,8 +3250,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.ClassLayout __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -3501,9 +3483,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Declaration __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Declaration __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Declaration((Declaration.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Declaration((Declaration.Internal*) native, skipVTables); } public static Declaration __CreateInstance(Declaration.Internal native, bool skipVTables = false) @@ -3559,8 +3541,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.Declaration __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -4025,9 +4005,9 @@ namespace CppSharp internal static extern uint getFriendsCount_0(global::System.IntPtr instance); } - public static new DeclarationContext __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new DeclarationContext __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new DeclarationContext((DeclarationContext.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new DeclarationContext((DeclarationContext.Internal*) native, skipVTables); } public static DeclarationContext __CreateInstance(DeclarationContext.Internal native, bool skipVTables = false) @@ -4418,9 +4398,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new TypedefDecl __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TypedefDecl __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TypedefDecl((TypedefDecl.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TypedefDecl((TypedefDecl.Internal*) native, skipVTables); } public static TypedefDecl __CreateInstance(TypedefDecl.Internal native, bool skipVTables = false) @@ -4546,9 +4526,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Friend __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Friend __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Friend((Friend.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Friend((Friend.Internal*) native, skipVTables); } public static Friend __CreateInstance(Friend.Internal native, bool skipVTables = false) @@ -4659,9 +4639,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Statement __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Statement __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Statement((Statement.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Statement((Statement.Internal*) native, skipVTables); } public static Statement __CreateInstance(Statement.Internal native, bool skipVTables = false) @@ -4708,8 +4688,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.Statement __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -4787,9 +4765,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Expression __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Expression __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Expression((Expression.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Expression((Expression.Internal*) native, skipVTables); } public static Expression __CreateInstance(Expression.Internal native, bool skipVTables = false) @@ -4871,9 +4849,9 @@ namespace CppSharp internal static extern void setOpcodeStr_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new BinaryOperator __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new BinaryOperator __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BinaryOperator((BinaryOperator.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BinaryOperator((BinaryOperator.Internal*) native, skipVTables); } public static BinaryOperator __CreateInstance(BinaryOperator.Internal native, bool skipVTables = false) @@ -5011,9 +4989,9 @@ namespace CppSharp internal static extern uint getArgumentsCount_0(global::System.IntPtr instance); } - public static new CallExpr __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new CallExpr __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new CallExpr((CallExpr.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new CallExpr((CallExpr.Internal*) native, skipVTables); } public static CallExpr __CreateInstance(CallExpr.Internal native, bool skipVTables = false) @@ -5132,9 +5110,9 @@ namespace CppSharp internal static extern uint getArgumentsCount_0(global::System.IntPtr instance); } - public static new CXXConstructExpr __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new CXXConstructExpr __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new CXXConstructExpr((CXXConstructExpr.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new CXXConstructExpr((CXXConstructExpr.Internal*) native, skipVTables); } public static CXXConstructExpr __CreateInstance(CXXConstructExpr.Internal native, bool skipVTables = false) @@ -5283,9 +5261,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Parameter __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Parameter __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Parameter((Parameter.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Parameter((Parameter.Internal*) native, skipVTables); } public static Parameter __CreateInstance(Parameter.Internal native, bool skipVTables = false) @@ -5535,9 +5513,9 @@ namespace CppSharp internal static extern uint getParametersCount_0(global::System.IntPtr instance); } - public static new Function __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Function __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Function((Function.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Function((Function.Internal*) native, skipVTables); } public static Function __CreateInstance(Function.Internal native, bool skipVTables = false) @@ -5913,9 +5891,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Method __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Method __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Method((Method.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Method((Method.Internal*) native, skipVTables); } public static Method __CreateInstance(Method.Internal native, bool skipVTables = false) @@ -6296,9 +6274,9 @@ namespace CppSharp internal static extern void setExpression_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new Item __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Item __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Item((Item.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Item((Item.Internal*) native, skipVTables); } public static Item __CreateInstance(Item.Internal native, bool skipVTables = false) @@ -6380,9 +6358,9 @@ namespace CppSharp } } - public static new Enumeration __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Enumeration __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Enumeration((Enumeration.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Enumeration((Enumeration.Internal*) native, skipVTables); } public static Enumeration __CreateInstance(Enumeration.Internal native, bool skipVTables = false) @@ -6583,9 +6561,9 @@ namespace CppSharp internal static extern void setMangled_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new Variable __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Variable __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Variable((Variable.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Variable((Variable.Internal*) native, skipVTables); } public static Variable __CreateInstance(Variable.Internal native, bool skipVTables = false) @@ -6703,9 +6681,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static BaseClassSpecifier __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static BaseClassSpecifier __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BaseClassSpecifier((BaseClassSpecifier.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BaseClassSpecifier((BaseClassSpecifier.Internal*) native, skipVTables); } public static BaseClassSpecifier __CreateInstance(BaseClassSpecifier.Internal native, bool skipVTables = false) @@ -6757,8 +6735,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.BaseClassSpecifier __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -6895,9 +6871,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Field __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Field __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Field((Field.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Field((Field.Internal*) native, skipVTables); } public static Field __CreateInstance(Field.Internal native, bool skipVTables = false) @@ -7077,9 +7053,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new AccessSpecifierDecl __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new AccessSpecifierDecl __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new AccessSpecifierDecl((AccessSpecifierDecl.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new AccessSpecifierDecl((AccessSpecifierDecl.Internal*) native, skipVTables); } public static AccessSpecifierDecl __CreateInstance(AccessSpecifierDecl.Internal native, bool skipVTables = false) @@ -7302,9 +7278,9 @@ namespace CppSharp internal static extern uint getSpecifiersCount_0(global::System.IntPtr instance); } - public static new Class __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Class __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Class((Class.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Class((Class.Internal*) native, skipVTables); } public static Class __CreateInstance(Class.Internal native, bool skipVTables = false) @@ -7709,9 +7685,9 @@ namespace CppSharp internal static extern uint getParametersCount_0(global::System.IntPtr instance); } - public static new Template __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Template __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Template((Template.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Template((Template.Internal*) native, skipVTables); } public static Template __CreateInstance(Template.Internal native, bool skipVTables = false) @@ -7901,9 +7877,9 @@ namespace CppSharp internal static extern uint getSpecializationsCount_0(global::System.IntPtr instance); } - public static new ClassTemplate __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ClassTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClassTemplate((ClassTemplate.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClassTemplate((ClassTemplate.Internal*) native, skipVTables); } public static ClassTemplate __CreateInstance(ClassTemplate.Internal native, bool skipVTables = false) @@ -8105,9 +8081,9 @@ namespace CppSharp internal static extern uint getArgumentsCount_0(global::System.IntPtr instance); } - public static new ClassTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ClassTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClassTemplateSpecialization((ClassTemplateSpecialization.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClassTemplateSpecialization((ClassTemplateSpecialization.Internal*) native, skipVTables); } public static ClassTemplateSpecialization __CreateInstance(ClassTemplateSpecialization.Internal native, bool skipVTables = false) @@ -8316,9 +8292,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new ClassTemplatePartialSpecialization __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ClassTemplatePartialSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClassTemplatePartialSpecialization((ClassTemplatePartialSpecialization.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClassTemplatePartialSpecialization((ClassTemplatePartialSpecialization.Internal*) native, skipVTables); } public static ClassTemplatePartialSpecialization __CreateInstance(ClassTemplatePartialSpecialization.Internal native, bool skipVTables = false) @@ -8451,9 +8427,9 @@ namespace CppSharp internal static extern uint getSpecializationsCount_0(global::System.IntPtr instance); } - public static new FunctionTemplate __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new FunctionTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new FunctionTemplate((FunctionTemplate.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new FunctionTemplate((FunctionTemplate.Internal*) native, skipVTables); } public static FunctionTemplate __CreateInstance(FunctionTemplate.Internal native, bool skipVTables = false) @@ -8597,9 +8573,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static FunctionTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static FunctionTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new FunctionTemplateSpecialization((FunctionTemplateSpecialization.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new FunctionTemplateSpecialization((FunctionTemplateSpecialization.Internal*) native, skipVTables); } public static FunctionTemplateSpecialization __CreateInstance(FunctionTemplateSpecialization.Internal native, bool skipVTables = false) @@ -8654,8 +8630,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.FunctionTemplateSpecialization __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -8805,9 +8779,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new Namespace __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new Namespace __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Namespace((Namespace.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Namespace((Namespace.Internal*) native, skipVTables); } public static Namespace __CreateInstance(Namespace.Internal native, bool skipVTables = false) @@ -8933,9 +8907,9 @@ namespace CppSharp internal static extern void dtor_0(global::System.IntPtr instance); } - public static new PreprocessedEntity __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new PreprocessedEntity __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new PreprocessedEntity((PreprocessedEntity.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new PreprocessedEntity((PreprocessedEntity.Internal*) native, skipVTables); } public static PreprocessedEntity __CreateInstance(PreprocessedEntity.Internal native, bool skipVTables = false) @@ -9071,9 +9045,9 @@ namespace CppSharp internal static extern void setExpression_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new MacroDefinition __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new MacroDefinition __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new MacroDefinition((MacroDefinition.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new MacroDefinition((MacroDefinition.Internal*) native, skipVTables); } public static MacroDefinition __CreateInstance(MacroDefinition.Internal native, bool skipVTables = false) @@ -9215,9 +9189,9 @@ namespace CppSharp internal static extern void setText_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new MacroExpansion __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new MacroExpansion __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new MacroExpansion((MacroExpansion.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new MacroExpansion((MacroExpansion.Internal*) native, skipVTables); } public static MacroExpansion __CreateInstance(MacroExpansion.Internal native, bool skipVTables = false) @@ -9400,9 +9374,9 @@ namespace CppSharp internal static extern uint getMacrosCount_0(global::System.IntPtr instance); } - public static new TranslationUnit __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TranslationUnit __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TranslationUnit((TranslationUnit.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TranslationUnit((TranslationUnit.Internal*) native, skipVTables); } public static TranslationUnit __CreateInstance(TranslationUnit.Internal native, bool skipVTables = false) @@ -9599,9 +9573,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static NativeLibrary __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static NativeLibrary __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new NativeLibrary((NativeLibrary.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new NativeLibrary((NativeLibrary.Internal*) native, skipVTables); } public static NativeLibrary __CreateInstance(NativeLibrary.Internal native, bool skipVTables = false) @@ -9656,8 +9630,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.NativeLibrary __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -9798,9 +9770,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ASTContext __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ASTContext __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ASTContext((ASTContext.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ASTContext((ASTContext.Internal*) native, skipVTables); } public static ASTContext __CreateInstance(ASTContext.Internal native, bool skipVTables = false) @@ -9855,8 +9827,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.ASTContext __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -9925,9 +9895,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Comment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Comment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Comment((Comment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Comment((Comment.Internal*) native, skipVTables); } public static Comment __CreateInstance(Comment.Internal native, bool skipVTables = false) @@ -9980,8 +9950,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.Comment __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) @@ -10026,9 +9994,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new BlockContentComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new BlockContentComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BlockContentComment((BlockContentComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BlockContentComment((BlockContentComment.Internal*) native, skipVTables); } public static BlockContentComment __CreateInstance(BlockContentComment.Internal native, bool skipVTables = false) @@ -10132,9 +10100,9 @@ namespace CppSharp internal static extern uint getBlocksCount_0(global::System.IntPtr instance); } - public static new FullComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new FullComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new FullComment((FullComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new FullComment((FullComment.Internal*) native, skipVTables); } public static FullComment __CreateInstance(FullComment.Internal native, bool skipVTables = false) @@ -10311,9 +10279,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Argument __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Argument __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Argument((Argument.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Argument((Argument.Internal*) native, skipVTables); } public static Argument __CreateInstance(Argument.Internal native, bool skipVTables = false) @@ -10368,8 +10336,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.BlockCommandComment.Argument __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -10394,9 +10360,9 @@ namespace CppSharp } } - public static new BlockCommandComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new BlockCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new BlockCommandComment((BlockCommandComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new BlockCommandComment((BlockCommandComment.Internal*) native, skipVTables); } public static BlockCommandComment __CreateInstance(BlockCommandComment.Internal native, bool skipVTables = false) @@ -10541,9 +10507,9 @@ namespace CppSharp InOut = 2 } - public static new ParamCommandComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ParamCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParamCommandComment((ParamCommandComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParamCommandComment((ParamCommandComment.Internal*) native, skipVTables); } public static ParamCommandComment __CreateInstance(ParamCommandComment.Internal native, bool skipVTables = false) @@ -10669,9 +10635,9 @@ namespace CppSharp internal static extern uint getPositionCount_0(global::System.IntPtr instance); } - public static new TParamCommandComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TParamCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TParamCommandComment((TParamCommandComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TParamCommandComment((TParamCommandComment.Internal*) native, skipVTables); } public static TParamCommandComment __CreateInstance(TParamCommandComment.Internal native, bool skipVTables = false) @@ -10787,9 +10753,9 @@ namespace CppSharp internal static extern void setText_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new VerbatimBlockLineComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new VerbatimBlockLineComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VerbatimBlockLineComment((VerbatimBlockLineComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VerbatimBlockLineComment((VerbatimBlockLineComment.Internal*) native, skipVTables); } public static VerbatimBlockLineComment __CreateInstance(VerbatimBlockLineComment.Internal native, bool skipVTables = false) @@ -10905,9 +10871,9 @@ namespace CppSharp internal static extern uint getLinesCount_0(global::System.IntPtr instance); } - public static new VerbatimBlockComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new VerbatimBlockComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VerbatimBlockComment((VerbatimBlockComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VerbatimBlockComment((VerbatimBlockComment.Internal*) native, skipVTables); } public static VerbatimBlockComment __CreateInstance(VerbatimBlockComment.Internal native, bool skipVTables = false) @@ -11030,9 +10996,9 @@ namespace CppSharp internal static extern void setText_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new VerbatimLineComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new VerbatimLineComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new VerbatimLineComment((VerbatimLineComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new VerbatimLineComment((VerbatimLineComment.Internal*) native, skipVTables); } public static VerbatimLineComment __CreateInstance(VerbatimLineComment.Internal native, bool skipVTables = false) @@ -11125,9 +11091,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new InlineContentComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new InlineContentComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new InlineContentComment((InlineContentComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new InlineContentComment((InlineContentComment.Internal*) native, skipVTables); } public static InlineContentComment __CreateInstance(InlineContentComment.Internal native, bool skipVTables = false) @@ -11234,9 +11200,9 @@ namespace CppSharp internal static extern uint getContentCount_0(global::System.IntPtr instance); } - public static new ParagraphComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new ParagraphComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParagraphComment((ParagraphComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParagraphComment((ParagraphComment.Internal*) native, skipVTables); } public static ParagraphComment __CreateInstance(ParagraphComment.Internal native, bool skipVTables = false) @@ -11429,9 +11395,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Argument __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Argument __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Argument((Argument.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Argument((Argument.Internal*) native, skipVTables); } public static Argument __CreateInstance(Argument.Internal native, bool skipVTables = false) @@ -11486,8 +11452,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.InlineCommandComment.Argument __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -11512,9 +11476,9 @@ namespace CppSharp } } - public static new InlineCommandComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new InlineCommandComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new InlineCommandComment((InlineCommandComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new InlineCommandComment((InlineCommandComment.Internal*) native, skipVTables); } public static InlineCommandComment __CreateInstance(InlineCommandComment.Internal native, bool skipVTables = false) @@ -11633,9 +11597,9 @@ namespace CppSharp internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); } - public static new HTMLTagComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new HTMLTagComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new HTMLTagComment((HTMLTagComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new HTMLTagComment((HTMLTagComment.Internal*) native, skipVTables); } public static HTMLTagComment __CreateInstance(HTMLTagComment.Internal native, bool skipVTables = false) @@ -11798,9 +11762,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static Attribute __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static Attribute __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new Attribute((Attribute.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new Attribute((Attribute.Internal*) native, skipVTables); } public static Attribute __CreateInstance(Attribute.Internal native, bool skipVTables = false) @@ -11855,8 +11819,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.HTMLStartTagComment.Attribute __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -11897,9 +11859,9 @@ namespace CppSharp } } - public static new HTMLStartTagComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new HTMLStartTagComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new HTMLStartTagComment((HTMLStartTagComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new HTMLStartTagComment((HTMLStartTagComment.Internal*) native, skipVTables); } public static HTMLStartTagComment __CreateInstance(HTMLStartTagComment.Internal native, bool skipVTables = false) @@ -12031,9 +11993,9 @@ namespace CppSharp internal static extern void setTagName_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new HTMLEndTagComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new HTMLEndTagComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new HTMLEndTagComment((HTMLEndTagComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new HTMLEndTagComment((HTMLEndTagComment.Internal*) native, skipVTables); } public static HTMLEndTagComment __CreateInstance(HTMLEndTagComment.Internal native, bool skipVTables = false) @@ -12136,9 +12098,9 @@ namespace CppSharp internal static extern void setText_0(global::System.IntPtr instance, global::System.IntPtr s); } - public static new TextComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static new TextComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new TextComment((TextComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new TextComment((TextComment.Internal*) native, skipVTables); } public static TextComment __CreateInstance(TextComment.Internal native, bool skipVTables = false) @@ -12262,9 +12224,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static RawComment __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static RawComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new RawComment((RawComment.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new RawComment((RawComment.Internal*) native, skipVTables); } public static RawComment __CreateInstance(RawComment.Internal native, bool skipVTables = false) @@ -12319,8 +12281,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.AST.RawComment __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppParser.cs index ce0c00d7..d663056e 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppParser.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppParser.cs @@ -241,9 +241,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ParserOptions __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ParserOptions __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParserOptions((ParserOptions.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParserOptions((ParserOptions.Internal*) native, skipVTables); } public static ParserOptions __CreateInstance(ParserOptions.Internal native, bool skipVTables = false) @@ -298,8 +298,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ParserOptions __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -687,9 +685,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ParserDiagnostic __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ParserDiagnostic __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParserDiagnostic((ParserDiagnostic.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParserDiagnostic((ParserDiagnostic.Internal*) native, skipVTables); } public static ParserDiagnostic __CreateInstance(ParserDiagnostic.Internal native, bool skipVTables = false) @@ -744,8 +742,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ParserDiagnostic __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -886,9 +882,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ParserResult __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ParserResult __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParserResult((ParserResult.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParserResult((ParserResult.Internal*) native, skipVTables); } public static ParserResult __CreateInstance(ParserResult.Internal native, bool skipVTables = false) @@ -943,8 +939,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ParserResult __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); @@ -1065,9 +1059,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ClangParser __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ClangParser __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ClangParser((ClangParser.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ClangParser((ClangParser.Internal*) native, skipVTables); } public static ClangParser __CreateInstance(ClangParser.Internal native, bool skipVTables = false) @@ -1118,8 +1112,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ClangParser __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); if (__ownsNativeInstance) diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Target.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Target.cs index 9056cc0f..dc431cc7 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Target.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Target.cs @@ -178,9 +178,9 @@ namespace CppSharp protected bool __ownsNativeInstance; - public static ParserTargetInfo __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false, bool skipVTables = false) + public static ParserTargetInfo __CreateInstance(global::System.IntPtr native, bool skipVTables = false) { - return new ParserTargetInfo((ParserTargetInfo.Internal*) native, skipVTables) { __ownsNativeInstance = ownsNativeInstance }; + return new ParserTargetInfo((ParserTargetInfo.Internal*) native, skipVTables); } public static ParserTargetInfo __CreateInstance(ParserTargetInfo.Internal native, bool skipVTables = false) @@ -235,8 +235,6 @@ namespace CppSharp protected virtual void Dispose(bool disposing) { - if (!__ownsNativeInstance && disposing) - throw new global::System.InvalidOperationException("Managed instances owned by native code cannot be disposed of."); CppSharp.Parser.ParserTargetInfo __dummy; NativeToManagedMap.TryRemove(__Instance, out __dummy); Internal.dtor_0((__Instance + __PointerAdjustment)); diff --git a/src/Generator/Generators/CLI/CLIHeadersTemplate.cs b/src/Generator/Generators/CLI/CLIHeadersTemplate.cs index 402900d4..2738547a 100644 --- a/src/Generator/Generators/CLI/CLIHeadersTemplate.cs +++ b/src/Generator/Generators/CLI/CLIHeadersTemplate.cs @@ -381,9 +381,6 @@ namespace CppSharp.Generators.CLI WriteLine("{0}({1} native);", @class.Name, nativeType); WriteLine("static {0}^ {1}(::System::IntPtr native);", @class.Name, Helpers.CreateInstanceIdentifier); - if (@class.IsRefType) - WriteLine("static {0}^ {1}(::System::IntPtr native, bool {2});", - @class.Name, Helpers.CreateInstanceIdentifier, Helpers.OwnsNativeInstanceIdentifier); foreach (var ctor in @class.Constructors) { diff --git a/src/Generator/Generators/CLI/CLISourcesTemplate.cs b/src/Generator/Generators/CLI/CLISourcesTemplate.cs index 8b785d88..044d5da2 100644 --- a/src/Generator/Generators/CLI/CLISourcesTemplate.cs +++ b/src/Generator/Generators/CLI/CLISourcesTemplate.cs @@ -257,8 +257,7 @@ namespace CppSharp.Generators.CLI if (CLIGenerator.ShouldGenerateClassNativeField(@class)) { - WriteLine("if ({0})", Helpers.OwnsNativeInstanceIdentifier); - WriteLineIndent("delete NativePtr;"); + WriteLine("delete NativePtr;"); } WriteCloseBraceIndent(); @@ -671,26 +670,7 @@ namespace CppSharp.Generators.CLI WriteStartBraceIndent(); - if (@class.IsRefType) - { - WriteLine("return ::{0}::{1}(native, false);", - qualifiedIdentifier, Helpers.CreateInstanceIdentifier); - WriteCloseBraceIndent(); - NewLine(); - - WriteLine("{0}^ {0}::{1}(::System::IntPtr native, bool {2})", - qualifiedIdentifier, Helpers.CreateInstanceIdentifier, Helpers.OwnsNativeInstanceIdentifier); - - WriteStartBraceIndent(); - WriteLine("::{0}^ result = gcnew ::{0}(({1}) native.ToPointer());", qualifiedIdentifier, nativeType); - if (@class.IsRefType) - WriteLine("result->{0} = {0};", Helpers.OwnsNativeInstanceIdentifier); - WriteLine("return result;"); - } - else - { - WriteLine("return gcnew ::{0}(({1}) native.ToPointer());", qualifiedIdentifier, nativeType); - } + WriteLine("return gcnew ::{0}(({1}) native.ToPointer());", qualifiedIdentifier, nativeType); WriteCloseBraceIndent(); NewLine(); diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index d0432d40..09a6fd82 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -1820,9 +1820,6 @@ namespace CppSharp.Generators.CSharp WriteLine("void Dispose(bool disposing)"); WriteStartBraceIndent(); - WriteLine("if (!{0} && disposing)", Helpers.OwnsNativeInstanceIdentifier); - WriteLineIndent("throw new global::System.InvalidOperationException" + - "(\"Managed instances owned by native code cannot be disposed of.\");"); if (@class.IsRefType) { @@ -1897,16 +1894,11 @@ namespace CppSharp.Generators.CSharp if (!@class.IsAbstractImpl) { PushBlock(CSharpBlockKind.Method); - WriteLine("public static {0}{1} {2}(global::System.IntPtr native{3}{4})", + WriteLine("public static {0}{1} {2}(global::System.IntPtr native, bool skipVTables = false)", @class.NeedsBase && !@class.BaseClass.IsInterface ? "new " : string.Empty, - @class.Name, Helpers.CreateInstanceIdentifier, - @class.IsRefType ? ", bool ownsNativeInstance = false" : string.Empty, - ", bool skipVTables = false"); + @class.Name, Helpers.CreateInstanceIdentifier); WriteStartBraceIndent(); - WriteLine("return new {0}(({1}.Internal*) native, skipVTables){2};", ctorCall, className, - @class.IsRefType - ? string.Format(" {{ {0} = ownsNativeInstance }}", Helpers.OwnsNativeInstanceIdentifier) - : string.Empty); + WriteLine("return new {0}(({1}.Internal*) native, skipVTables);", ctorCall, className); WriteCloseBraceIndent(); PopBlock(NewLineKind.BeforeNextBlock); } diff --git a/tests/CSharp/CSharp.Tests.cs b/tests/CSharp/CSharp.Tests.cs index 1f618a85..62455ded 100644 --- a/tests/CSharp/CSharp.Tests.cs +++ b/tests/CSharp/CSharp.Tests.cs @@ -323,19 +323,6 @@ public class CSharpTests : GeneratorTestFixture } } - [Test] - public void TestNotDestroyingForeignObjects() - { - using (var testNativeToManagedMap = new TestNativeToManagedMap()) - { - var hasVirtualDtor2 = testNativeToManagedMap.HasVirtualDtor2; - Assert.Catch(hasVirtualDtor2.Dispose); - var hasVirtualDtor1 = hasVirtualDtor2.HasVirtualDtor1; - Assert.AreEqual(5, hasVirtualDtor1.TestField); - Assert.Catch(hasVirtualDtor1.Dispose); - } - } - [Test] public void TestCallingVirtualDtor() {