Skip to content

Instantly share code, notes, and snippets.

View nicolargo's full-sized avatar

Nicolas Hennion nicolargo

View GitHub Profile
@nicolargo
nicolargo / gist:4a8e88b91c6ee814d8e11246587f4311
Created January 25, 2025 10:33
Create a simple memory leak in Python (only for test purpose)
import time
# Leak 1000 bytes every 1 second
leak_size_byte = 1000
leak_freq_sec = 1
class LeakyObject:
def __init__(self, id):
self.id = id
self.data = "X" * leak_size_byte