Python for .NET Developers Transcripts
Chapter: Memory management in Python
Lecture: Introduction to memory management

Login or purchase this course to watch this video and the rest of the course contents.
0:00 In this chapter we're going to talk about memory management in Python. Both Python and C# basically take care of memory for us.
0:09 So, why should we even talk about it? Well, on one hand, you can just ignore it, right? Just create your objects, and call functions
0:16 and magically things are handled. However, understanding how memory works gives us a better intuition of how our code executes, how performance works
0:26 all sorts of things like that. You probably have a fairly good understanding of C#'s memory management its garbage collector. We're going
0:34 to talk about Python's as well. Now, for some reason, talking about memory management in Python is not nearly as popular or as big of a talking point
0:44 as it is in C#. There's a ton of analysis of garbage collectors and algorithms and all sorts of stuff. In Python there's not too much.
0:52 So, what I'm going to do is I'm going to give you a little bit of insight into how Python manages memory so you'll have a good working model of what's
1:00 happening when you write your code and how it's taking care of memory for us. But like I said, in both of these languages
1:05 you don't have to actively do too much to make the memory management work but it's a really good idea to have
1:11 an understanding of how it's being done for you.

Talk Python's Mastodon Michael Kennedy's Mastodon