Time Nick Message 12:31 Kalvo Hey everyone quick question. Does node metadata get destroyed when a node gets destroyed? (Or when using set_node()) 12:33 rubenwardy yes with set_node 12:33 rubenwardy which is how nodes are dug under the hood 12:33 rubenwardy swap_node and LVMs don't do this, and don't run callbacks either 17:19 Krock rubenwardy, do you have any opinion/reply for this comment? https://github.com/minetest/minetest/pull/7214/files#r182687246 If not, I will merge the PR this evening 17:19 rubenwardy it will never be null 17:19 rubenwardy hmmm 17:20 Krock it can be null when the reference is kept in Lua 17:20 rubenwardy issue is, it should be documented if it ever turns null 17:20 rubenwardy no, all the providers use pointers 17:20 rubenwardy so it'll just be a garbage pointer 17:20 rubenwardy it's probably best to change that to return 0; to futue proof it 17:20 rubenwardy needs to be documented as well 17:21 Krock for the sake of completeness `nil` is appropriate there. Do you have time to update it or shall I take care of it? 17:24 rubenwardy won't have time today 17:45 Krock I see. The NodeMetaRef::getmeta function is safe and NULL return values are possible there, whereas it looks quite bad with other MetaData types