When setting a buffer into an instance of class Buffer previous referenced buffer is freed. Even if this buffer was not allocated by the instance.
To avoid this, class Buffer could be extended into TuxedoBuffer and FmlBuffer class. These classes are extending the Buffer class with memory management functions that are either FML memory handling functions or Tuxedo memory handling functions (tpalloc and tpfree).
When setting a buffer into an instance of class Buffer previous referenced buffer is freed. Even if this buffer was not allocated by the instance.
To avoid this, class Buffer could be extended into TuxedoBuffer and FmlBuffer class. These classes are extending the Buffer class with memory management functions that are either FML memory handling functions or Tuxedo memory handling functions (tpalloc and tpfree).