Comments (2)
What's happening here is:
- An instance of
Layer
is default constructed inside your cdef class. - You create a temporary instance of
Layer
and assign that (operator=
) to the one stored in your cdef class. - The temporary instance of layer is destructed, freeing the memory.
- Your cdef class is destructed, freeing the memory again.
This is a bug in your code, not a bug in Cython. Read https://en.cppreference.com/w/cpp/language/rule_of_three.
Support questions are best directed to the Cython-user's mailing list in future (I appreciate you probably thought this was a Cython bug though)
from cython.
Really insightful comment of yours! So glad this is not a real bug. I've tried so hard and thought this could only be due to a malfunction. Thank you very much.
from cython.
Related Issues (20)
- [BUG] Segfault when __dealloc__ calls a non-existent method. HOT 2
- [BUG] Segfault when passing None to `cdef` method.
- [BUG] Cython inserts a call to PyMemoryView_CheckExact() which is not present in CPython API HOT 1
- Notes on "tuple table" HOT 4
- [BUG] Incompatible pointer in inlined method of derived class HOT 2
- Document and improve generation of C lines in traceback HOT 9
- [BUG] Fused type in init yields broken C program
- [BUG] `.so` file size too large? HOT 10
- [ENH] Reduce the code size of the memory view implementation HOT 2
- [BUG] cimporting from a pxd with memoryviews injects memoryview utility code
- [BUG] Complex function argument lists causing MSVC to fail HOT 10
- [BUG] Enabling limited API attempts to take the size of an opaque object HOT 11
- [ENH] Conditional Compilation HOT 2
- Migrating notes on Cython wrappers from SciPy wiki
- PyUnicode_AsUnicode missing Error with Python 3.12 on Windows HOT 5
- Use `Py_IncRef()` and `Py_DecRef()` in Limited API
- [BUG] Access violation using cython.ufunc with cimport numpy HOT 3
- [BUG] Regression in cython 3.0.9 HOT 3
- [BUG] Can not do logic with `char *` ? HOT 2
- [BUG] Compiler crash using ufunc with multiple, fused return types 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 cython.