Skip to content

Commit

Permalink
patch draw(a::Actor) function (#17)
Browse files Browse the repository at this point in the history
Update draw(a::Actor) method to use `SDL2.DestroyTexture` on generated textures after they have been rendered. Should address #15
  • Loading branch information
dustyirwin committed Oct 17, 2020
1 parent d7361f3 commit 53a1ee5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/actor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ function draw(a::Actor)
Ref(SDL2.Rect(r.x, r.y, w′, h′)),
a.angle,
C_NULL,
UInt32(0) )
UInt32(0)
)
SDL2.DestroyTexture(texture)
end

"""Angle to the horizontal, of the line between two actors, in degrees"""
Expand Down

0 comments on commit 53a1ee5

Please sign in to comment.