diff --git a/README.md b/README.md index 6c0618627..cae66f775 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Procedures for each standard are provided by the following R7RS-style libraries: cmake -B build -DCMAKE_BUILD_TYPE=Release cd build make package -sudo apt install build/meevax_0.5.77_amd64.deb +sudo apt install build/meevax_0.5.78_amd64.deb ``` or @@ -123,9 +123,9 @@ sudo rm -rf /usr/local/share/meevax | Target Name | Description |-------------|------------- -| `all` | Build shared-library `libmeevax.0.5.77.so` and executable `meevax` +| `all` | Build shared-library `libmeevax.0.5.78.so` and executable `meevax` | `test` | Test executable `meevax` -| `package` | Generate debian package `meevax_0.5.77_amd64.deb` +| `package` | Generate debian package `meevax_0.5.78_amd64.deb` | `install` | Copy files into `/usr/local` directly ## Usage diff --git a/VERSION b/VERSION index c3ae0979f..4fbfa885b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.77 +0.5.78 diff --git a/include/meevax/memory/gc_pointer.hpp b/include/meevax/memory/gc_pointer.hpp index 3ce108e40..f139eadc2 100644 --- a/include/meevax/memory/gc_pointer.hpp +++ b/include/meevax/memory/gc_pointer.hpp @@ -47,8 +47,9 @@ inline namespace memory template )> explicit gc_pointer(T const& datum) : pointer { datum } - , collector::registration { locate(pointer::get()) } - {} + { + assert(pointer::get() == nullptr); + } auto operator =(gc_pointer const& gcp) -> auto & { @@ -62,6 +63,12 @@ inline namespace memory return *this; } + auto operator =(std::nullptr_t) -> auto & + { + reset(); + return *this; + } + auto reset(gc_pointer const& gcp) -> void { pointer::reset(gcp);