diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2021-04-28 17:05:10 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2021-04-29 00:30:42 +0200 |
commit | 3a3cbeecc113daf992de838a39569f6c81876dbe (patch) | |
tree | b51ab1145c2753b8f95acedc2dfd4cb35f281ea6 /ddk-template-cplusplus.cpp | |
parent | aa3ff58c3c3939b1fc6b31e9db279e7bb97e7020 (diff) |
Added first known issue regarding `static MyClass test;` ctor/dtor failure.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'ddk-template-cplusplus.cpp')
-rw-r--r-- | ddk-template-cplusplus.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ddk-template-cplusplus.cpp b/ddk-template-cplusplus.cpp index 9406213..380603a 100644 --- a/ddk-template-cplusplus.cpp +++ b/ddk-template-cplusplus.cpp @@ -7,12 +7,18 @@ class TestSmth public: TestSmth() { + DbgPrint("%s\n", "ctor"); + } + ~TestSmth() + { + DbgPrint("%s\n", "dtor"); } void doSmth(void) { DbgPrint("%s\n", "Hello Class!"); } }; +static TestSmth * cdtor_test; class Derived : public TestSmth { @@ -20,6 +26,9 @@ public: Derived() { } + ~Derived() + { + } void doSmth(void) { DbgPrint("%s\n", "Hello Derived!"); @@ -75,6 +84,7 @@ extern "C" (void)RegistryPath; DbgPrint("%s\n", "Hello ring0!"); + cdtor_test = new TestSmth(); /* support for service stopping */ DriverObject->DriverUnload = DriverUnload; @@ -88,6 +98,7 @@ extern "C" { (void)DriverObject; + delete cdtor_test; DbgPrint("%s\n", "Bye ring0!"); } } |