# David Lönnhager

> developer at Mullvad VPN AB

**Wikidata**: [Q120097775](https://www.wikidata.org/wiki/Q120097775)  
**Source**: https://4ort.xyz/entity/david-lonnhager

## Summary
David Lönnhager is a programmer and software developer employed by Mullvad VPN AB since September 30, 2019. He is known for contributing to open-source projects, specifically fixing memory leaks in Pygame's display.set_mode() function.

## Biography
- Born: [date and place not provided]
- Nationality: [not provided]
- Education: [not provided]
- Known for: Fixing memory leaks in Pygame's display.set_mode() function
- Employer(s): Mullvad VPN AB (2019-09-30 – present)
- Field(s): Software development, programming

## Contributions
David Lönnhager has made concrete contributions to open-source software, particularly within the Pygame ecosystem. In September 2019, he identified and resolved critical memory leaks in the `display.set_mode()` function. His fix specifically addressed issues where surfaces were not being freed when using the OPENGL or SCALED rendering modes. He implemented a new function, `pgSurface_SetSurface(...)`, to properly manage surface memory allocation and deallocation. This work, documented in his GitHub contributions under the username "dlon," directly improved the stability and reliability of Pygame applications utilizing these specific rendering options, preventing potential crashes and resource exhaustion for developers and users.

## FAQs
### Q: What is David Lönnhager's role at Mullvad VPN AB?
A: David Lönnhager is a programmer and software developer at Mullvad VPN AB, having joined the organization on September 30, 2019.

### Q: What notable technical contribution has David Lönnhager made?
A: He is known for fixing memory leaks in Pygame's `display.set_mode()` function, specifically when using OPENGL or SCALED rendering modes, by implementing a new surface management function.

### Q: Where can I find David Lönnhager's professional work?
A: His professional contributions are visible on GitHub under the username "dlon" and on his LinkedIn profile (ID: davidlonnhager).

### Q: What is David Lönnhager's occupation?
A: He is a programmer and software developer.

## Why They Matter
David Lönnhager's work, particularly his fix for the Pygame memory leak, matters because it directly addresses a critical stability issue affecting developers using Pygame for graphics-intensive applications. By ensuring proper memory management in `display.set_mode()`, he prevented potential crashes and resource leaks that could undermine the reliability of games and multimedia applications built with Pygame. His contribution exemplifies the importance of dedicated developers in maintaining and improving foundational open-source tools. His ongoing role at Mullvad VPN AB, a prominent privacy-focused VPN provider, signifies his commitment to software development within the privacy and security technology space.

## Notable For
*   Identifying and fixing critical memory leaks in Pygame's `display.set_mode()` function (OPENGL/SCALED modes) in September 2019.
*   Implementing the `pgSurface_SetSurface(...)` function to resolve the Pygame memory leak issue.
*   Long-term employment as a programmer at Mullvad VPN AB since September 30, 2019.
*   Contributing to open-source projects under the GitHub username "dlon".
*   Holding the occupation of programmer and software developer.

## Body
### Technical Contributions
*   **Pygame Memory Leak Fix (Sept 2019):** Identified and resolved memory leaks in Pygame's `display.set_mode()` function. The leaks occurred specifically when using OPENGL or SCALED rendering modes, where surfaces were not being properly freed. Implemented a new function, `pgSurface_SetSurface(...)`, to manage surface memory allocation and deallocation correctly. This work was documented in his GitHub contributions under the username "dlon".

### Employment History
*   **Mullvad VPN AB:** Programmer / Software Developer. Employment started on September 30, 2019. This is his current and only known employer. His role is confirmed via LinkedIn and archived GitHub activity showing his joining date.

### Online Presence
*   **GitHub:** Username `dlon`. Activity includes the Pygame memory leak fix mentioned above.
*   **LinkedIn:** Profile ID `davidlonnhager`. Confirms his employment as a Software Developer at Mullvad VPN AB since October 2019.

## References

1. LinkedIn