WeAreDevelopers LIVE Mar 2, 2022

Pointers? In My Python? It's More Likely Than You Think

Eli Holderness

Think Python shields you from pointers? Discover how hidden references cause cyclic memory leaks, why tuples can mutate, and how CPython's garbage collector actually works.

Pause
Mute Enter Fullscreen
#1 about 2 min

Understanding pointers and namespaces in Python

Variables in Python act as pointers mapping namespace references to objects stored in memory.

#2 about 2 min

The mechanics of pointer aliasing with lists

Assigning a new variable to an existing list creates a pointer alias instead of a separate object.

#3 about 4 min

Cloning mutable objects using copy and deepcopy methods

Standard copying and deep copying mechanisms safely duplicate complex mutable structures to avoid unintended aliasing.

#4 about 3 min

Understanding immutable structures and tuple assignment behaviors

In-place augmentation operators act unpredictably when mutating lists embedded within immutable tuple structures.

#5 about 3 min

Identifying objects using memory addresses and identifiers

The built-in identification function tracks an object's unique memory address throughout its lifespan.

#6 about 5 min

Comparing object equality with value and identity operators

Memory identity comparisons using the identity operator differ from value equivalence calculations handled by magic methods.

#7 about 2 min

Managing memory allocation through reference counting

Python frees system memory automatically by tracking references and deallocating unreachable components.

#8 about 3 min

Analyzing memory deallocation using the __del__ method

Custom finalizers execute specialized cleanup logic just before unreferenced objects are removed from system memory.

#9 about 4 min

Identifying memory leaks caused by cyclic isolates

Objects referencing each other create closed reference loops that successfully bypass standard deallocation processes.

#10 about 3 min

Resolving cyclic references via the garbage collector

The built-in garbage collection module detects and forcibly breaks isolated reference cycles to free memory.

#11 about 5 min

De-isolating memory cycles during garbage collection operations

Improperly defining global variables inside finalizer methods prevents the automated collector from completely clearing cyclic memory.

#12 about 6 min

Addressing garbage collection performance impacts and scope pitfalls

Balancing garbage collection frequency against object creation rates optimizes memory performance and prevents unintended scoping behaviors.

Matching moments

1:56 min

Evaluating object memory references and namespace resolution

Oliver Bestwalter · LIVE

4:38 min

Exploring the inherent mutability of Python built-in attributes

Oliver Bestwalter · LIVE

3:50 min

Python data abstraction and foundational object attributes

Diana Gastrin · WWC 2023

3:04 min

Exploring early programming foundations and structural boundaries

Jaroslaw Kutylowski Jaroslaw Kutylowski +1 · WWC 2023

1:36 min

Introduction to programming language internal workings

Aleksandra Sikora · WWC 2023

5:20 min

Managing memory and resources with deterministic object destruction

Andreas Fertig · WWC 2021

Upcoming sessions on this topic

Open session

World Congress 2026 North America

When Humans Stop Writing Code: Rethinking Languages, Compilers, and Responsibility

Simon Auer

Organizer of flutter vienna meetup and CEO of marqably

Simon Auer
Open session

World Congress 2026 North America

Building World-Aware Robots with Agent Memory and Context Graphs

Zaid Zaim

Developer Advocate EMEA at Neo4j | Microsoft AI MVP

Zaid Zaim
Open session

World Congress 2026 North America

You Can’t Re-Run Sunlight: Designing ML Data Architectures for Physical AI

An Phan

Senior Data Infrastructure Engineer @ Hippo Harvest

An Phan
Open session

World Congress 2026 North America

Designing APIs That Survive AI Agents at Scale

Phani Pendurthi

Mastercard, Principal Software Engineer

Phani Pendurthi
Open session

World Congress 2026 North America

AI That Argues With Itself: Building Self-Debating Systems That Catch Their Own Bugs

Shreya Singhal

AI Applied Scientist at Claritev

Shreya Singhal
Open session

World Congress 2026 North America

public void saveMoney(AI): The Developer's Guide to Unit Economics

Hrushikesh Pokala

Senior Software Engineer Lead at Equifax

Hrushikesh Pokala