FlashKeepers

Computer Science · College

Object-Oriented Programming, Unit 7: Exception Handling and Memory Management

Object-Oriented Programming, unit: Exception Handling and Memory Management. Core concepts, terminology, and worked-example cues a college student meets for this unit, building on prior units without repeating them. Front: a term, concept, or short problem cue. Back: the definition, explanation, or answer.

16 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone
What is exception handling?
A mechanism for responding to and managing runtime errors in a controlled way
What is an exception?
An object representing an error or unexpected event that disrupts normal program flow
What does a 'try' block do?
Contains code that might throw an exception during execution
What does a 'catch' block do?
Handles a specific type of exception thrown in the corresponding try block
What does a 'finally' block do?
Executes cleanup code regardless of whether an exception was thrown or caught
What is throwing an exception?
Signaling that an error has occurred by creating and raising an exception object
What is a checked exception?
An exception that must be explicitly caught or declared, enforced at compile time
What is an unchecked exception?
An exception not required to be caught or declared, typically representing programming errors
What is exception propagation?
An uncaught exception passing up through calling methods until it is handled or crashes the program
What is a custom exception class used for?
Representing application-specific error conditions with meaningful names and information
What is memory management, in OOP languages?
The process of allocating and freeing memory used by objects during a program's execution
What is garbage collection?
An automatic process that reclaims memory used by objects no longer referenced by a program
What is a memory leak?
Memory that is no longer needed but not released, gradually exhausting available resources
What is manual memory management?
A model where the programmer explicitly allocates and frees memory, as in C
What is a reference count, in some garbage collection schemes?
A tracked number of references to an object, used to determine when it can be freed

1 more cards in the app