Skip to content

v2.1.0

Compare
Choose a tag to compare
@github-actions github-actions released this 14 Apr 05:46
· 39 commits to master since this release

The 2.1.0 minor update introduces a few new features, some slight performance/memory improvements and patch some bugs.

New

  • Custom instantiators now support rfk::UniquePtr as well! You can now declare instantiators returning a rfk::UniquePtr. See the Instantiator wiki page for more information.
  • The last version of Kodgen brings a new feature allowing to select the C++ version used to parse the code, hence bringing support for C++20 syntax (concepts etc...). See Kodgen file parser settings for details.
  • A custom dynamicCast function is now available to perform casts on reflected class types independently of the native c++ RTTI system. It hasn't been benchmarked nor optimized yet, so there's no performance improvement guarantee compared to the native C++ dynamic_cast as of now.

Updates

  • checkedInvoked can't be called on instances not inheriting from rfk::Object anymore. checkedInvoke needs to access the dynamic archetype of an instance to be able to adjust the caller pointer when necessary.
  • Memory for fields and methods is now allocated ahead of time with the exact necessary amount of memory to avoid unnecessary reallocations and unused memory, slightly improving startup time and memory footprint.

Fixes

  • Parent virtual methods are now callable with rfk::Method::invoke and rfk::Method::checkedInvoke on children instances without crash. However, rfk::Method::checkedInvoke now requires the caller to inherit from rfk::Object, and rfk::Method::invoke is not safe if the method is virtual, the caller pointer doesn't immediately point to the called method vtable, and the caller doesn't inherit from rfk::Object.
  • Structs metadata are now correctly unregistered from other related Structs (parents, subclasses) when they are released. Not doing so was causing corrupted pointers to released metadata when said metadata was part of a dynamically unloaded library.