I was told that if my mapping has another mapping nested inside, I will have to delete the inner mapping before I can delete the parent.

How about mapping with a struct of array inside? Example:

struct st {
    uint[] a;
}

mapping(address => st) m;

Do I need to do something like this?

delete m[<address>].a;
delete m[<address>];

Thanks in advance.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.