Comments (1)
Calling it a memory leak is not entirely correct. It is rather than freetype-py did not automatically tidy things up in the right order. So if you have python destructors automatically calling the destructors in c for you, then you may have segfaults when python does not destroy them in the right order; the "fix" at some point in the past was to NOT automatically call c desctructors from python instructors, and just not tidy up at all, and rely on the OS to tidy up on exit of the python script. If you are familiar with freetype enough, you can manually calls the c destructors from freetype-py in the right order within, for long-running freetype-py scripts.
I think it may be a little too much bending over for users' convenience to have automatic tidy up that "works". The c-side is basically library have faces, faces have glyphs, glyphs have bitmaps and outlines, etc. And each of those have "up" references and know what they belong. C users always creates in one direction of order and destroy it from the opposite order.
If you want convenient automatic tidy up to work I.e. you use a whole bunch of faces, find a whole bunch of glyphs, draw a whole bunch of outlines and bitmaps, and then just move on, and hope that freetype-py to tidy them up for you, there will be a whole lot of code on the python side tracking what owns what and what references what. Like if you destroy a face, do you destroy all its associated glyphs and bitmaps now, or do some lazy thing and marked it as deleted but not, and wait until the last glyph/bitmap's with this face is destroyed before actually destroying the face?
from freetype-py.
Related Issues (20)
- Two-factor identification on PyPi HOT 5
- get_cbox() raise "invalid argument" error HOT 3
- Wrong horizontal character positioning in hello world examples HOT 9
- New release with pyinstaller fix HOT 5
- feature request: expose FreeType's COLRv1 API HOT 6
- Please publish .tar.gz sdist archives
- on exit, freetype/__init__.py", line 1233, in __del__ TypeError: 'NoneType' object is not callable HOT 10
- `segfault` with version `2.4.0` HOT 15
- `load_char` failed for custom fonts with right input HOT 28
- Pyinstaller cannot import module HOT 5
- AttributeError: module 'freetype' has no attribute 'Face' HOT 2
- Please provide non-bundled wheels HOT 7
- Remove the pyinstaller code if there is any more trouble
- Move freetype-py to Freetype organisation ? HOT 27
- How to change the default encoding? HOT 4
- Check upstream and sync FT_ENCODING_* naming and additional aliases.
- Bitmap of numbers or letters is incorrect HOT 12
- Add some support for CMAP format 14 (IVS/SVS characters) HOT 13
- Readthedocs docs outdated/ no long build. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freetype-py.