void IniFile::unset(const String& section, const String& key)
{
    const GenericScopedLock<CriticalSection> scopedlock(lock);
    String realSection(section);
    if (realSection.isEmpty()) {
        realSection = "__empty";
    }
    
    if (!data.contains(realSection)) {
        return;
    }

    DynamicObject *sectionObject = data[realSection].getDynamicObject();
    sectionObject->removeProperty(key);
    
    if (realSection != "__empty" && sectionObject->getProperties().size() == 0) {
        data.remove(realSection);
    }
}