Skip to content
This repository has been archived by the owner on Jun 18, 2020. It is now read-only.

[ZendEngine Driver] Fix constructor/desctructor calls #50

Open
martin-schilling opened this issue Jan 20, 2018 · 1 comment
Open

[ZendEngine Driver] Fix constructor/desctructor calls #50

martin-schilling opened this issue Jan 20, 2018 · 1 comment

Comments

@martin-schilling
Copy link
Collaborator

Since objects are created through PHPs ecalloc() which internally uses malloc() the constructors are not called. This can be fixed through the usage of a placement new which should be added to all objects relying on a constructor. The same applies for the desctructors which means that more custom object handlers must be implemented and the desctructor has to be called manually (eg intern->~Connection())

@martin-schilling
Copy link
Collaborator Author

This means a arangodb::fuerte::php::Response::handler_response.free_obj = [function] that calls the destructor has to be defined. This function is not (anymore) required to free the objects memory, it is just used for freeing custom data.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant