I'd have to think that your application must still be accessing the FGDB somehow. I write to FGDBs programmatically (with .NET though) and don't have to do anything to specifically release my FGDB after I write to it. There really is no way to kill the lock files either. I actually talked to Craig Gillgrass with ESRI about killing lock files and they told me there is no way to do it. Now, that said, I have seen instances where orphaned lock files get left behind, and those usually can be deleted, since they are orphaned. Here's some .NET that I use to check for locks, maybe it will help:
// Before we do anything, run through the FGDB FCs and see if there are locks on any of them
string gdb = String.Concat(c.fgdbDir, @"\", kvp.Key[0], ".gdb");
gp.SetEnvironmentValue("workspace", gdb);
IGpEnumList fcs = gp.ListFeatureClasses("*", "", "");
string fc = fcs.Next();
while (fc != "")
{
IFeatureClass u = OpenFc(String.Concat(c.fgdbDir, @"\", kvp.Key[0], ".gdb"), fc);
IDataset ds = (IDataset)u;
// Get a schemalock on the dataset - this means there is always at least one lock on the FC
ISchemaLock sl = (ISchemaLock)ds;
IEnumSchemaLockInfo enumSLI;
sl.GetCurrentSchemaLocks(out enumSLI);
int slc = 0;
ISchemaLockInfo sli = enumSLI.Next();
while (sli != null)
{
slc++;
sli = enumSLI.Next();
}
// If schemalock count is >=2, then we have a problem, something else has a lock on the FC
if (slc >= 2)
{
c.msg = "Schemalock count on FC '" + fc + "' in FGDB '" + kvp.Key[0] + "': " + slc.ToString();
Console.WriteLine(c.msg);
Messaging.Log(c.msg, c.lw);
ISchemaLock sl2 = (ISchemaLock)ds;
IEnumSchemaLockInfo enumSLI2;
sl2.GetCurrentSchemaLocks(out enumSLI2);
ISchemaLockInfo sli2 = enumSLI2.Next();
while (sli2 != null)
{
c.msg = " Schemalock info: " + sli2.TableName + " : " + sli2.UserName + " : " + sli2.SchemaLockType;
Console.WriteLine(c.msg);
Messaging.Log(c.msg, c.lw);
sli2 = enumSLI2.Next();
}
keysToDelete.Add(kvp.Key);
break;
}
fc = fcs.Next();
// Set schemalock object = null so lock we created goes away, otherwise, there will still be a lock on the FC
// and processing will bomb
System.Runtime.InteropServices.Marshal.ReleaseComObject(ds);
System.Runtime.InteropServices.Marshal.ReleaseComObject(u);
System.Runtime.InteropServices.Marshal.ReleaseComObject(sl);
}