function getAllWaves() public view returns (Wave[] memory) {
return waves;
}
I was going through _buildspace tutorial and found this code. I had previously read that memeroy keyword is used in solidity to specify that variable should be stored in memeroy(instead of state), so that we can destroy it after function call. But why memory is mentioned in return part of this view function since it just returns a value.
I am newbie in solidity so any articles relating to this also will help. Thanks