#895: Towards automatic allocation and deallocation of PMC attributes
----------------------+-----------------------------------------------------
Reporter: NotFound | Owner:
Type: feature | Status: new
Priority: normal | Milestone:
Component: none | Version: 1.4.0
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
----------------------+-----------------------------------------------------
Currently all PMC that use attributes must allocate and deallocate the
struct that contains them during init and destroy. This is boring and
error prone, and disallows or makes difficult using SUPER inside init.
I've thinked a way to avoid this: by storing the size of the struct inside
the vtable, pmc_new and friends can allocate it before calling init, and
will be easy to deallocate it during garbage collection when all PMC gets
checked against minimal problems.
I've done some tests and looks promising.
To make easier that change, and as general cleaning, several PMC need some
changes in his initialization/destruction and attribute usage. I'll refer
to this ticket in the changes related to that.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/895>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets