remove sectonStack by clicking icon at section header

i have created a sectionStack and customized the section header with icon (delete button).
if there is many section is created,
how can i remove the selected section button only by clicking the icon button?

the example given by smartClient is juz remove the last section only:

sectionStack.removeSection(sectionStack.sections.length-1);

You can refer to sections by their ID as well. See the docs for removeSection()