I'm trying to remove object and free from memory. I googled some, and found an old article
https://blenderartists.org/t/how-to-clean-memory-after-running-a-script/608062
I copied the script and executed on my blender 2.82. But the console returned error at the line 78.
scene = bpy.data.scenes[0]
# Unlink and remove object first
for ob in bpy.data.objects:
scene.objects.unlink(ob) # At this line
It says, 'bpy_prop_collection' object has no attribute 'unlink'. I think it's because the API changed during update, but I can't figure out how to change it. Thanks for reading.