Content created by members - what happens when membership expires

As part of our membership service, members can create content in the website. However, when their membership expires, the content should effectively expire with it. So we should never have active content associated with an inactive member. Is this something that can be done with membership? If not, any suggestions how we can achieve this?