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>
(cherry picked from commit 5c33902)
  • Loading branch information
abadams authored and alexreinking committed Jan 5, 2022
1 parent 384fc8d commit 27ac49b
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 @@ -991,8 +991,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 27ac49b

Please sign in to comment.