whether its a logout or just a /reload i get the same result, i tried your code just changing the names
Code:
local frame = CreateFrame('Frame', nil, UIParent)
frame:RegisterEvent('ADDON_LOADED')
frame:SetScript('OnEvent', function(self, event, addon)
if addon ~= 'testaddon' then return end
if not mLayouts then
mLayouts = {}
print("still not saved")
end
end)
"still not saved" is printed every login regardless