Skip to content

Commit

Permalink
free shape storage last (#6511)
Browse files Browse the repository at this point in the history
Some decref-triggered runtime methods need the shape

Fixes #6509

Co-authored-by: Steven Johnson <srj@google.com>
  • Loading branch information
abadams and steven-johnson committed Jan 4, 2022
1 parent 0089de9 commit 5c33902
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/HalideBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -995,8 +995,8 @@ class Buffer {
* this is the last reference to it. Will assert fail if there are
* weak references to this Buffer outstanding. */
~Buffer() {
free_shape_storage();
decref();
free_shape_storage();
}

/** Get a pointer to the raw halide_buffer_t this wraps. */
Expand Down

0 comments on commit 5c33902

Please sign in to comment.