MCPcopy Create free account
hub / github.com/VCVRack/Rack / ~Window

Method ~Window

src/window/Window.cpp:376–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374
375
376Window::~Window() {
377 if (APP->scene) {
378 widget::Widget::ContextDestroyEvent e;
379 e.vg = vg;
380 APP->scene->onContextDestroy(e);
381 }
382
383 // Fonts and Images in the cache must be deleted before the NanoVG context is deleted
384 internal->fontCache.clear();
385 internal->imageCache.clear();
386
387 // nvgDeleteClone(fbVg);
388
389#if defined NANOVG_GL2
390 nvgDeleteGL2(vg);
391 nvgDeleteGL2(fbVg);
392#elif defined NANOVG_GL3
393 nvgDeleteGL3(vg);
394#elif defined NANOVG_GLES2
395 nvgDeleteGLES2(vg);
396#endif
397
398 glfwDestroyWindow(win);
399 delete internal;
400}
401
402
403math::Vec Window::getSize() {

Callers

nothing calls this directly

Calls 2

onContextDestroyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected