mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 09:15: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) {
|
} else if (binding instanceof ICPPTemplateParameter) {
|
||||||
return binding;
|
return binding;
|
||||||
|
} else if (binding instanceof ICPPConstructor) {
|
||||||
|
return binding;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -255,7 +255,8 @@ public class PDOMFile implements IIndexFragmentFile {
|
||||||
public void setInternalLocation(String internalLocation) throws CoreException {
|
public void setInternalLocation(String internalLocation) throws CoreException {
|
||||||
Database db = fLinkage.getDB();
|
Database db = fLinkage.getDB();
|
||||||
long oldRecord = db.getRecPtr(record + LOCATION_REPRESENTATION);
|
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());
|
db.putRecPtr(record + LOCATION_REPRESENTATION, db.newString(internalLocation).getRecord());
|
||||||
location= null;
|
location= null;
|
||||||
}
|
}
|
||||||
|
@ -524,7 +525,12 @@ public class PDOMFile implements IIndexFragmentFile {
|
||||||
* @throws CoreException
|
* @throws CoreException
|
||||||
*/
|
*/
|
||||||
public void delete() 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 {
|
public void addIncludesTo(IncludeInformation[] includeInfos) throws CoreException {
|
||||||
|
|
|
@ -147,6 +147,7 @@ public class PDOMMacro implements IIndexMacro, IPDOMBinding, IASTFileLocation {
|
||||||
if (params != null) {
|
if (params != null) {
|
||||||
params.delete();
|
params.delete();
|
||||||
}
|
}
|
||||||
|
linkage.getDB().free(fRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PDOMMacroContainer getContainer() throws CoreException {
|
public PDOMMacroContainer getContainer() throws CoreException {
|
||||||
|
|
Loading…
Add table
Reference in a new issue