Skip to content

p5.Framebuffer.remove() doesn't remove some resources  #7048

@nickmcintyre

Description

@nickmcintyre

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

1.9.3

Web browser and version

Chrome 124.0.6367.208

Operating system

macOS 14.4.1

Steps to reproduce this

Steps:

  1. Call myBuffer.remove().
  2. Call print(myBuffer) or use myBuffer elsewhere.

Snippet:

function doubleClicked() {
  myBuffer.remove();

  // Should this be empty-ish?
  print(myBuffer);
}

Here's the sketch for reference.

Does myBuffer have to be nullified in order for its resources to be garbage collected? It seems like the only other reference is cleared here.

Maybe too in-the-weeds, but if there's another reference somewhere in the sketch, then the resources are never fully freed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions