Skip to content

Commit

Permalink
cuda.gl: use dispose*
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjbq7 committed Jun 1, 2024
1 parent 4451add commit 740744e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions extra/cuda/gl/gl.factor
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ DESTRUCTOR: free-resource

TUPLE: cuda-buffer
{ buffer buffer }
{ resource pinned-c-ptr } ;
{ resource pinned-c-ptr }
disposed ;

: <cuda-buffer> ( upload usage kind size initial-data flags -- buffer )
[ <buffer> dup ] dip buffer>resource cuda-buffer boa ; inline
[ <buffer> dup ] dip buffer>resource f cuda-buffer boa ; inline

M: cuda-buffer dispose
M: cuda-buffer dispose*
[ [ free-resource ] when* f ] change-resource
buffer>> dispose ; inline

Expand Down

0 comments on commit 740744e

Please sign in to comment.