Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle lambdas in lists #24

Merged
merged 1 commit into from
Mar 11, 2016
Merged

Conversation

adambaratz
Copy link
Contributor

The added unit test verifies my recent changes to libmustache. The changes to mustache_data_from_array_zval were needed for a less than clear reason. It seemed that when array indices were set explicitly, it didn't end up having any contents visible to the Data destructor, so the associated memory wouldn't be freed. I might want to go back at some point and get rid of the length attribute of Data. It looks like it's mainly used for initialization, so only serves to be something that has to be kept in sync.

@jbboehr
Copy link
Owner

jbboehr commented Mar 11, 2016

Looks good!

WRT freeing memory, in handlebars, I'm using a pool allocator. I had looked into using one for mustache, or even using emalloc, but it's a bit more complex for C++. Besides preventing leaks, the other advantage is you don't have to traverse the AST or data trees on destruct.

@jbboehr jbboehr added this to the v0.7.1 milestone Mar 11, 2016
jbboehr added a commit that referenced this pull request Mar 11, 2016
@jbboehr jbboehr merged commit 11108e3 into jbboehr:master Mar 11, 2016
@adambaratz adambaratz deleted the lambdas_in_lists branch March 18, 2016 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants