I need to replace a lot of actions a lot of time, so I wrote a script that remove the fake user and all users but I still need to save the file and reopen it to have a clean file and then I can import the new datablock.
Is there a way to remove datablocks without reopen the file?
Because it doesn’t remove references from other objects to this datablock. As soon as an actual user tries to access the removed datablock, Blender will crash (I assume it’s a dangling pointer, trying to read from the memory address it points to is an access violation).