Object Performance Improvement for MATLAB (Beta)

New MATLAB Object Management System - Beta

You are now following this Submission

We are changing the way MATLAB manages objects that should make object creation, deletion, and property access significantly faster than it is today. In order to do that, we need to change the way MATLAB objects are removed from memory when they are no longer needed. In the new system, we are moving to a garbage collection approach.
For most people, most of the time, the changes will not affect them other than the fact that their objects will be faster. However, in some very specific cases, objects may get deleted at a different time and possibly in a different order which could affect the behavior of your code. This can only happen if the following three conditions are simultaneously true
  • The code creates objects which reference each other in a cycle (e.g. objA -> objB -> objC -> objA). This can only happen with handle objects.
  • At least one of the objects in that cycle has a custom delete method
  • The timing or order of deletion of objects in that custom delete method affects the behavior of the code
If these three conditions are true, the code may be incompatible with the new garbage collection approach. We think the likelihood is small for most people but we want to use the Beta as a way to estimate the possible impact of the changes we are making.
In the Beta, we are asking people to run their code with some tooling to look for any problematic areas in their code. If you wish to participate, download and install this support package, and follow the instructions in the documentation included. This support package works with MATLAB R2026b and beyond.

MATLAB Release Compatibility

  • Compatible with R2026b

Platform Compatibility

  • Windows
  • macOS (Apple Silicon)
  • macOS (Intel)
  • Linux