Object: rename BKE_object_runtime_free, leave data cleared
Rename BKE_object_runtime_free -> BKE_object_runtime_free_data, since the runtime pointer is part of the object, only the data is freed. Leave the data cleared to avoid accidental use, this is in keeping with other `*_free_data()` functions.
This commit is contained in:
parent
3182844914
commit
6cf28e98fb
|
@ -374,7 +374,7 @@ struct MovieClip *BKE_object_movieclip_get(struct Scene *scene,
|
|||
|
||||
void BKE_object_runtime_reset(struct Object *object);
|
||||
void BKE_object_runtime_reset_on_copy(struct Object *object, const int flag);
|
||||
void BKE_object_runtime_free(struct Object *object);
|
||||
void BKE_object_runtime_free_data(struct Object *object);
|
||||
|
||||
void BKE_object_batch_cache_dirty_tag(struct Object *ob);
|
||||
|
||||
|
|
|
@ -1116,9 +1116,9 @@ static void curve_to_mesh_eval_ensure(Object *object)
|
|||
BKE_object_eval_assign_data(&remapped_object, &mesh_eval->id, true);
|
||||
}
|
||||
|
||||
BKE_object_runtime_free(&remapped_object);
|
||||
BKE_object_runtime_free(&taper_object);
|
||||
BKE_object_runtime_free(&taper_object);
|
||||
BKE_object_runtime_free_data(&remapped_object);
|
||||
BKE_object_runtime_free_data(&taper_object);
|
||||
BKE_object_runtime_free_data(&taper_object);
|
||||
}
|
||||
|
||||
static Mesh *mesh_new_from_curve_type_object(Object *object)
|
||||
|
|
|
@ -5116,12 +5116,15 @@ void BKE_object_runtime_reset_on_copy(Object *object, const int UNUSED(flag))
|
|||
/**
|
||||
* The function frees memory used by the runtime data, but not the runtime field itself.
|
||||
*
|
||||
* The caller is expected to run #BKE_object_runtime_reset if the struct will be used again.
|
||||
* All runtime data is cleared to ensure it's not used again,
|
||||
* in keeping with other `_free_data(..)` functions.
|
||||
*/
|
||||
void BKE_object_runtime_free(Object *object)
|
||||
void BKE_object_runtime_free_data(Object *object)
|
||||
{
|
||||
/* Currently this is all that's needed. */
|
||||
BKE_object_free_derived_caches(object);
|
||||
|
||||
BKE_object_runtime_reset(object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue