Python: In Python, which comparison about Reference Counting and Garbage Collection is accurate?

Difficulty:

Easy

Questions:

1

Time Limit:

2 minutes

Passing Score:

100%

Question

In Python, which comparison about Reference Counting and Garbage Collection is accurate?

  1. There is no practical difference in behavior, performance, or maintainability when Reference Counting and Garbage Collection is involved.
  2. The oldest option related to Reference Counting and Garbage Collection is always the right production choice regardless of workload or context.
  3. Reference counting frees many objects immediately, while cycle detection is needed when objects keep each other alive indirectly.
  4. Differences around Reference Counting and Garbage Collection are mostly cosmetic, so correctness and debugging quality do not really change.

Hint

Focus on the behavior or tradeoff, not just the keyword.

Answer and rationale

Correct answer: C. Reference counting frees many objects immediately, while cycle detection is needed when objects keep each other alive indirectly.

Reference counting frees many objects immediately, while cycle detection is needed when objects keep each other alive indirectly. This is the comparison that usually separates memorization from understanding.

Track: Python