mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 01:05:38 +02:00
Bug 320426: Index grows when updating files.
This commit is contained in:
parent
faf5bdce21
commit
1becc70584
3 changed files with 11 additions and 2 deletions
|
@ -535,6 +535,8 @@ public class PDOMASTAdapter {
|
|||
}
|
||||
} else if (binding instanceof ICPPTemplateParameter) {
|
||||
return binding;
|
||||
} else if (binding instanceof ICPPConstructor) {
|
||||
return binding;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -255,7 +255,8 @@ public class PDOMFile implements IIndexFragmentFile {
|
|||
public void setInternalLocation(String internalLocation) throws CoreException {
|
||||
Database db = fLinkage.getDB();
|
||||
long oldRecord = db.getRecPtr(record + LOCATION_REPRESENTATION);
|
||||
db.free(oldRecord);
|
||||
if (oldRecord != 0)
|
||||
db.getString(oldRecord).delete();
|
||||
db.putRecPtr(record + LOCATION_REPRESENTATION, db.newString(internalLocation).getRecord());
|
||||
location= null;
|
||||
}
|
||||
|
@ -524,7 +525,12 @@ public class PDOMFile implements IIndexFragmentFile {
|
|||
* @throws CoreException
|
||||
*/
|
||||
public void delete() throws CoreException {
|
||||
fLinkage.getDB().free(record);
|
||||
Database db = fLinkage.getDB();
|
||||
long locRecord = db.getRecPtr(record + LOCATION_REPRESENTATION);
|
||||
if (locRecord != 0)
|
||||
db.getString(locRecord).delete();
|
||||
|
||||
db.free(record);
|
||||
}
|
||||
|
||||
public void addIncludesTo(IncludeInformation[] includeInfos) throws CoreException {
|
||||
|
|
|
@ -147,6 +147,7 @@ public class PDOMMacro implements IIndexMacro, IPDOMBinding, IASTFileLocation {
|
|||
if (params != null) {
|
||||
params.delete();
|
||||
}
|
||||
linkage.getDB().free(fRecord);
|
||||
}
|
||||
|
||||
public PDOMMacroContainer getContainer() throws CoreException {
|
||||
|
|
Loading…
Add table
Reference in a new issue