What is the use?
Where we use.
What issue does it resolve?
Pros & Cons
What is the use?
Where we use.
What issue does it resolve?
Pros & Cons
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Tuhin PaulRank #7 · 71.9K reputationPosted Jan 20, 2025, 11:30 AM EST
A strong reference is the most common type of reference. When you create an object in a program, it is typically referenced strongly by default. If an object has a strong reference pointing to it, the object will not be collected by the garbage collector (GC), as the GC considers it to still be in use.
Use Cases
Issue It Resolves
Tuhin PaulRank #7 · 71.9K reputationPosted Jan 20, 2025, 11:36 AM EST
A weak reference is a reference that does not prevent the referenced object from being garbage collected. If no strong references to the object exist, the garbage collector can remove the object from memory, even if weak references are still pointing to it.
Use Cases
Issue It Resolves