webmachinelearning / webnn

🧠 Web Neural Network API
https://www.w3.org/TR/webnn/
Other
397 stars 47 forks source link

Rename destroy() to release() #756

Open reillyeon opened 2 months ago

reillyeon commented 2 months ago

Since in many cases a resource continues to exist for a period of time while processing finishes I think it will be less confusing to developers to name these methods release().

bbernhar commented 2 months ago

I'm unsure how WebNN's "destroy()" meaning differs from WebGPU's "destroy()" to justify a new name. Web developers should be familiar with "destroy" meaning delayed destruction. I could see release() being specifically useful for interop to mean "expire".