class MyLib < RBA::Library
def initialize(pcell_classes)
...
register("MyLib")
end
end
$lib && $lib._destroy
$lib = MyLib::new
will crash the application on second execution if a cell referring to this library is present.
The reason is that "_destroy" will kill the library and leave the cells referring to it in an undefined state. Instead, just creating a new library is fine as "register" will replace all references to the old instance. So "_destroy" is not required.
The fix is to disallow "_destroy". To keep old code working, a dummy implementation shall be provided.
The text was updated successfully, but these errors were encountered:
The following code
will crash the application on second execution if a cell referring to this library is present.
The reason is that "_destroy" will kill the library and leave the cells referring to it in an undefined state. Instead, just creating a new library is fine as "register" will replace all references to the old instance. So "_destroy" is not required.
The fix is to disallow "_destroy". To keep old code working, a dummy implementation shall be provided.
The text was updated successfully, but these errors were encountered: