Skip to content

Commit

Permalink
pull request about issue #2062 (car_racing.py memory leaking issue ) (#…
Browse files Browse the repository at this point in the history
…2096)

* car_racing.py memory leaking issue #2062 solving

* additional memory leaking resolve
  • Loading branch information
jackyoung96 authored Feb 16, 2021
1 parent 8a721ac commit c8a6593
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gym/envs/box2d/car_racing.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ def render_road(self):
len(polygons_) // 3, ("v3f", polygons_), ("c4f", colors) # gl.GL_QUADS,
)
vl.draw(gl.GL_QUADS)
vl.delete()

def render_indicators(self, W, H):
s = W / 40.0
Expand Down Expand Up @@ -589,6 +590,7 @@ def horiz_ind(place, val, color):
len(polygons) // 3, ("v3f", polygons), ("c4f", colors) # gl.GL_QUADS,
)
vl.draw(gl.GL_QUADS)
vl.delete()
self.score_label.text = "%04i" % self.reward
self.score_label.draw()

Expand Down

0 comments on commit c8a6593

Please sign in to comment.