Hello,
I'm trying to solve my crash and memory leak problems with reading API source code and trying macros/functions. Trying to understand Phalcon API with reading it's source and then understanding Zend API is time consuming (since zend api has no documentation, I try to read zend engine source code)
It would be nice to have some small how-to/where-to-use documentation about some macros/functions of Phalcon.
Ie, in which conditions to use:
PHALCON_INIT_VAR and PHALCON_INI_NVAR (I understand NVAR clears variable reference if exists and nulls then allocates the memory).
PHALCON_SEPARATE_PARAM
PHALCON_OBSERVE_VAR
PHALCON_CPY_WRT/CPY_WRT_CTOR
RETURN_CTOR and RETURN_CCTOR/CCTORW (cctor and cctorw is same?)
PH_CTOR, PH_COPY and PH_SEPARATE (PH_SEPARATE creates new variable with reference of given var and deletes original one? - PH_COPY just uses reference of given var?)
in which condition to define variables with passing default value NULL (I have solved some of my crash problems with defining default value as NULL)
when to use
zend_is_true and if (variable) or if (!variable) PHALCON_IS_TRUE/FALSE, etc.
I don't know why but I feel that my code is lots of memory leaks...
A small introduction for internal API would be very handful.