diff options
Diffstat (limited to 'include/jvmfwk/framework.hxx')
-rw-r--r-- | include/jvmfwk/framework.hxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/jvmfwk/framework.hxx b/include/jvmfwk/framework.hxx index e88ae4be0b15..9a3b88479ab7 100644 --- a/include/jvmfwk/framework.hxx +++ b/include/jvmfwk/framework.hxx @@ -255,6 +255,26 @@ struct JavaInfo rtl::ByteSequence arVendorData; }; +namespace jfw { + +struct JavaInfoGuard { + JavaInfoGuard(JavaInfoGuard &) = delete; + void operator =(JavaInfoGuard) = delete; + + JavaInfoGuard(): info(nullptr) {} + + ~JavaInfoGuard() { delete info; } + + void clear() { + delete info; + info = nullptr; + } + + JavaInfo * info; +}; + +} + /** compares two <code>JavaInfo</code> objects for equality. <p>Two <code>JavaInfo</code> objects are said to be equal if the contained |