GtkSharp/generator
Bertrand Lorentz e48ac63d54 generator: Dispose ownable method parameters in VM callback (bxc#237)
Some virtual methods are passed a native object that is wrapped in an
IDisposable managed object, which is then passed on to the managed
overrides. We need to dispose those objects as soon as possible,
otherwise their native counterpart will not be freed until the next
garbage collection. Requiring the overrides to dispose them would be
cumbersome and error-prone.

Those parameters will now be disposed in a finally {...} block, after
the virtual method has returned. This means that overrides should not
keep a reference to such a parameter outside of the scope of the method,
as it will be diposed when the method returns.

This change only affects Cairo.Context parameter for now, but it was
particularly needed for them, as they could happily hold on to tens of
MBs of memory until the next garbage collection.
2013-11-09 16:26:17 +01:00
..
.gitignore Clean up .gitignore files 2013-10-13 18:38:33 +02:00
AliasGen.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
ArrayParameter.cs generator: Switch a lot of collections to their generic counterpart 2012-11-04 16:58:49 +01:00
BoxedGen.cs generator: Refactor the member hashes in ClassBase 2012-11-04 17:26:26 +01:00
ByRefGen.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
CallbackGen.cs generator: fixed glue code for callbacks 2013-10-09 15:44:33 +02:00
ChildProperty.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
ClassBase.cs generator: Added constants to gapi 2013-10-08 18:45:42 +02:00
ClassField.cs Restructure log warnings in validation. 2011-02-20 12:11:08 -06:00
ClassGen.cs generator: Added constants to gapi 2013-10-08 18:45:42 +02:00
CodeGenerator.cs generator: new --gapidir flag to search for xml files 2013-10-09 20:00:14 +02:00
Constant.cs generator: Remove unused field in Constant class 2013-10-10 23:43:55 +02:00
ConstFilenameGen.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
ConstStringGen.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
Ctor.cs generator: Use List<T> in generated constructors 2012-11-04 16:58:49 +01:00
DefaultSignalHandler.cs 2009-04-13 Christian Hoff <christian_hoff@gmx.net> 2009-04-13 17:44:48 +00:00
DESIGN generator: Update the documentation in generator/DESIGN 2012-11-15 19:31:28 +01:00
EnumGen.cs generator: Switch a lot of collections to their generic counterpart 2012-11-04 16:58:49 +01:00
FieldBase.cs generator: Remove unused variable in FieldBase class 2013-10-10 23:44:24 +02:00
gapi-fixup.cs Move the fixup tool from the parser to the generator folder 2013-10-13 17:04:56 +02:00
gapi3-codegen.in 2009-07-24 Christian Hoff <christian_hoff@gmx.net> 2009-07-24 05:19:17 +00:00
gapi3-fixup.in Move the fixup tool from the parser to the generator folder 2013-10-13 17:04:56 +02:00
GenBase.cs generator: generate all interfaces with the "I" prefix (.NET convention) 2013-07-23 12:05:24 -05:00
GenerationInfo.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
generator.csproj generator: add reference to System.Core in the MSBuild csproj 2013-10-22 12:17:50 +02:00
GObjectVM.cs Convert some dynamic casts to static casts 2013-10-13 19:10:03 +02:00
HandleBase.cs Implement Ownable Generatable type. 2011-04-21 18:04:47 -05:00
IAccessor.cs 2005-07-02 Mike Kestner <mkestner@novell.com> 2005-07-02 15:23:27 +00:00
IGeneratable.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
IManualMarshaler.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
InterfaceGen.cs generator: drop unneeded parameter in WriteLine() call 2013-10-21 17:10:11 +02:00
InterfaceVM.cs Restructure log warnings in validation. 2011-02-20 12:11:08 -06:00
IOwnable.cs Implement Ownable Generatable type. 2011-04-21 18:04:47 -05:00
LogWriter.cs Add missing file. 2011-02-21 11:19:10 -06:00
LPGen.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
LPUGen.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
Makefile.am Move the fixup tool from the parser to the generator folder 2013-10-13 17:04:56 +02:00
ManagedCallString.cs generator: Dispose ownable method parameters in VM callback (bxc#237) 2013-11-09 16:26:17 +01:00
ManualGen.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
MarshalGen.cs 2009-04-13 Christian Hoff <christian_hoff@gmx.net> 2009-04-13 17:44:48 +00:00
Method.cs generator: simplify bool logic in Method class 2013-10-21 17:09:40 +02:00
MethodBase.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
MethodBody.cs generator: Bumped parser_version to 3 2013-10-08 15:39:31 +02:00
NativeStructGen.cs generator: Remove unused variables in NativeStructGen 2013-10-10 23:47:12 +02:00
ObjectBase.cs generator: Refactor the member hashes in ClassBase 2012-11-04 17:26:26 +01:00
ObjectField.cs generator: added conversion for byref structs 2013-10-09 13:40:56 +02:00
ObjectGen.cs generator: added defaultconstructoraccess attrib 2013-10-09 13:13:15 +02:00
OpaqueGen.cs generator: Added constants to gapi 2013-10-08 18:45:42 +02:00
Options.cs generator: Improve handling of command-line parameters 2012-11-25 15:05:17 +01:00
OwnableGen.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
Parameter.cs generator: Dispose ownable method parameters in VM callback (bxc#237) 2013-11-09 16:26:17 +01:00
Parameters.cs generator: Implement attribute to hide method parameters 2013-10-11 23:36:20 +02:00
Parser.cs generator: new --gapidir flag to search for xml files 2013-10-09 20:00:14 +02:00
Property.cs generator: generate all interfaces with the "I" prefix (.NET convention) 2013-07-23 12:05:24 -05:00
PropertyBase.cs generator: Properly handle boolean attributes when parsing the XML 2012-10-21 18:22:13 +02:00
ReturnValue.cs generator: leverage framework's String.IsNullOrEmpty() call 2013-10-21 17:13:31 +02:00
Signal.cs generator: generate all interfaces with the "I" prefix (.NET convention) 2013-07-23 12:05:24 -05:00
Signature.cs generator: fixed optional array parameters 2013-10-09 20:35:02 +02:00
SimpleBase.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
SimpleGen.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
Statistics.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
StructBase.cs generator: Add support for suppressing the Equals(T) method in structs 2013-10-10 16:27:13 +02:00
StructField.cs generator: fixed optional array parameters 2013-10-09 20:35:02 +02:00
StructGen.cs generator: Convert all .cs files to Unix line endings 2012-11-03 15:20:06 +01:00
SymbolTable.cs glib,generator: map MainContext type and expose members 2013-10-09 19:44:50 +02:00
UnionGen.cs generator: Add missing copyright headers in files added by Stephan 2013-10-10 23:38:03 +02:00
VirtualMethod.cs generator: Dispose ownable method parameters in VM callback (bxc#237) 2013-11-09 16:26:17 +01:00
VMSignature.cs generator: Switch a lot of collections to their generic counterpart 2012-11-04 16:58:49 +01:00
XmlElementExtensions.cs generator: Add a XmlElement.GetAttributeAsBoolean extension method 2012-10-21 18:21:54 +02:00