Episode 18: Reference Counting episode artwork

EPISODE · Jan 24, 2025 · 1H 39M

Episode 18: Reference Counting

from core.py · host Pablo Galindo and Łukasz Langa

After we talked about memory allocation in Python back in Episode 16, we're ready to complain, uh, explain reference counting. Or at least throw a bunch of reference counting facts at you. Plus a big assortment of recent Python changes. You ready? ## Timestamps (00:00:00) INTRO (00:04:17) PART 0: SPORTS NEWS (00:06:53) PART 1: REFERENCE COUNTING (00:08:28) New segment of 2025 (00:13:54) C++ is asymptotic Python (00:15:37) Is Rust game yet? (00:18:01) Names (00:20:25) Breaking the law (00:23:08) sys.getrefcount() (00:25:21) Pedantic Pablo (00:26:06) sys.gettotalrefcount() (00:31:24) TraceRefs (00:33:28) Advantages of refcounting (00:36:16) Disadvantages of refcounting (00:38:40) Reference cycles (00:40:39) Multithreading (00:41:25) When refcounting goes wrong (00:44:05) Freeing memory in Python doesn't return it to the OS (00:45:42) Leaks and cycles redux (00:50:29) Double free (00:53:05) Avoiding reference counting (00:54:59) Immortal objects (01:00:40) PART 2: WHAT'S GOING ON IN CPYTHON (01:02:43) New features (01:04:11) Assorted interesting changes (01:15:23) Performance (01:18:09) Free-threading changes galore (01:27:02) AsyncIO (01:34:25) Windows changes (01:36:45) Security (01:37:20) OUTRO

After we talked about memory allocation in Python back in Episode 16, we're ready to complain, uh, explain reference counting. Or at least throw a bunch of reference counting facts at you. Plus a big assortment of recent Python changes. You ready? ## Timestamps (00:00:00) INTRO (00:04:17) PART 0: SPORTS NEWS (00:06:53) PART 1: REFERENCE COUNTING (00:08:28) New segment of 2025 (00:13:54) C++ is asymptotic Python (00:15:37) Is Rust game yet? (00:18:01) Names (00:20:25) Breaking the law (00:23:08) sys.getrefcount() (00:25:21) Pedantic Pablo (00:26:06) sys.gettotalrefcount() (00:31:24) TraceRefs (00:33:28) Advantages of refcounting (00:36:16) Disadvantages of refcounting (00:38:40) Reference cycles (00:40:39) Multithreading (00:41:25) When refcounting goes wrong (00:44:05) Freeing memory in Python doesn't return it to the OS (00:45:42) Leaks and cycles redux (00:50:29) Double free (00:53:05) Avoiding reference counting (00:54:59) Immortal objects (01:00:40) PART 2: WHAT'S GOING ON IN CPYTHON (01:02:43) New features (01:04:11) Assorted interesting changes (01:15:23) Performance (01:18:09) Free-threading changes galore (01:27:02) AsyncIO (01:34:25) Windows changes (01:36:45) Security (01:37:20) OUTRO

NOW PLAYING

Episode 18: Reference Counting

0:00 1:39:07

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

Rich Dad's Guide to Investing II Robert T. Kiyosaki II Full Audiobook II Robert T. Kiyosaki Investing means different things to different people… and there is a huge difference between passive investing and becoming an active, engaged investor. Rich Dad’s Guide to Investing, one of the three core titles in the Rich Dad Series, covers the basic rules of investing, how to reduce your investment risk, how to convert your earned income into passive income… plus Rich Dad’s 10 Investor Controls.The Rich Dad philosophy makes a key distinction between managing your money and growing it… and understanding key principles of investing is the first step toward creating and growing wealth. This book delivers guidance, not guarantees, to help anyone begin the process of becoming an active investor on the road to financial freedom. Growth Triggers Luis Diaz Discover how to use your podcast to generate leads, sales, and influence in any market.On this show Luis shares his best tested and proven secrets, tips, and strategies from launching over 300 podcasts in over a dozen different niches and generating over 59 Million Downloads for his clients.Learn how to increase your podcast listenership, create multiple new revenue streams with your podcast, sell more of your core offer and build a show that gives you leverage and authority in your space. From picking the right monetization strategy for your podcast to learning how to position your podcast in a crowded market on Apple and Spotify; this is show is the ultimate marketing and sales resource for online business owners who want to know what works with podcasting.Get in touch over on Instagram <a target="_blank" rel="noopener noreferrer nofollow" class="link" href="https://www.instagram.com/luisr The Soundless Flame Its-all-here A flame that has no fire A song without a sound I Am the deep desire The stillness all around Reveal the core, O Spirit The place no thought can claim Before all worlds inherit I Am the soundless flame

Frequently Asked Questions

How long is this episode of core.py?

This episode is 1 hour and 39 minutes long.

When was this core.py episode published?

This episode was published on January 24, 2025.

What is this episode about?

After we talked about memory allocation in Python back in Episode 16, we're ready to complain, uh, explain reference counting. Or at least throw a bunch of reference counting facts at you. Plus a big assortment of recent Python changes. You...

Can I download this core.py episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!