Skip to content

Refactor ObjectInstance into C++ class

Philip Chimento requested to merge ptomato/gjs:refactor-object-instance into master

This is a large refactor, changing ObjectInstance from a C struct into a C++ class. The reason is to make the code in gi/object.cpp more maintainable, and to allow splitting ObjectInstance into two classes, ObjectInstance and ObjectPrototype, which both inherit from an ObjectPrivateBase. Since there are several members of ObjectInstance currently that don't need to be on every instance, and a typical gnome-shell run creates tens if not hundreds of thousands of GObject instances, even a savings of 8 or 16 bytes per struct is worth it.

Merge request reports