MCPcopy Create free account
hub / github.com/NetHack/NetHack / destroy_tty

Function destroy_tty

outdated/sys/mac/mactty.c:292–313  ·  view source on GitHub ↗

* Done with a window - destroy it. Release the memory only if * it wasn't allocated when we got it! */

Source from the content-addressed store, hash-verified

290 * it wasn't allocated when we got it!
291 */
292short
293destroy_tty(WindowPtr window)
294{
295 short s_err;
296 RECORD_EXISTS(record);
297
298 s_err = free_bits(record);
299 if (!s_err) {
300#if !TARGET_API_MAC_CARBON
301 if (record->was_allocated) {
302 CloseWindow(window);
303 } else {
304#endif
305 DisposeWindow(window);
306#if !TARGET_API_MAC_CARBON
307 }
308#endif
309 s_err = dispose_ptr(record);
310 }
311
312 return s_err;
313}
314
315static void
316do_set_port_font(tty_record *record)

Callers 1

mactty.cFile · 0.85

Calls 2

free_bitsFunction · 0.85
dispose_ptrFunction · 0.85

Tested by

no test coverage detected