Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How does it deal with cycles, or leaning ownership?


This is exactly the qestion I was asking myself. What if the child block needs to be deallocated before the parent block ? What if block dependency is changed ?

These functions are to be used with particular conditions which aren't clearly specified. When the conditions are met then it is a clear benefit to use them. But these add complexity and new pitfalls to inexperienced programmers.


What's leaning ownership?


I don't think it deals with cycles at all (it's hierarchical, after all), but talloc does allow you to do funky stuff with object ownership - it uses reference counting and features a talloc_steal() function to move ownership.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: