fixed leak. deletion order was important as noted in the HDK docs
fixed leak. deletion order was important as noted in the HDK docs

davidsminor/cortex,davidsminor/cortex,lento/cortex,appleseedhq/cortex,goddardl/cortex,goddardl/cortex,danieldresser/cortex,hradec/cortex,danieldresser/cortex,lento/cortex,davidsminor/cortex,appleseedhq/cortex,goddardl/cortex,davidsminor/cortex,hradec/cortex,danieldresser/cortex,appleseedhq/cortex,lento/cortex,hradec/cortex,danieldresser/cortex