office-gobmx/cli_ure
Stephan Bergmann a2166dfd41 Avoid MSVC error C2039
At least with VS 2022 Preview 17.6.0 Preview 3.0 and (if that makes a difference
here) --with-latest-c++, the build started to fail now for me with

> cli_ure/source/climaker/climaker_app.cxx(603): error C2039: '{dtor}': is not a member of 'System::IDisposable'

Originally, in 4c937bbdbb "#107130# new",
TypeEmitter in cli_ure/source/climaker/climaker_share.h had been defined as

> __gc class TypeEmitter : public ::System::IDisposable

with an overriding Dispose member function (and no user-declared dtor), and the
code in cli_ure/source/climaker/climaker_app.cxx had called

>         type_emitter->Dispose();

when done.  Then, in 6fa1a74ec4 "convert climaker
to new syntax", the definition of TypeEmitter had been changed to

> ref class TypeEmitter : public ::System::IDisposable

with a dtor instead of the overriding Dispose member function, and the code in
cli_ure/source/climaker/climaker_app.cxx had been changed to call

>         type_emitter->~TypeEmitter();

instead.

I have no deep understanding of the Managed C++/CLI stuff at play here, but it
looks reasonable to avoid all this by not deriving from IDisposable (and relying
on GC to clean up all instances) and introducing some explicit finish()
protocol.

Change-Id: I8ebfba9d9f9c32b65a50104d200306e06dc69f73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150387
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-17 15:07:57 +02:00
..
qa
source
unotypes
version
CliLibrary_cli_basetypes.mk
CliLibrary_cli_ure.mk
CliNativeLibrary_cli_cppuhelper.mk
CliUnoApi_cli_uretypes.mk
CustomTarget_cli_ure_assemblies.mk
Executable_climaker.mk
Library_cli_cppuhelper_native.mk
Library_cli_uno.mk
Makefile
Module_cli_ure.mk
Package_cli_basetypes_copy.mk
README.md
readme.txt

Common Language Infrastructure (CLI) UNO Runtime Environment

Support assemblies and tools for the MS .NET UNO binding.

See also

[git:cli_ure/readme.txt]