Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Archived:Landmarks category selector dialog leaks memory (Known Issue)

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata
Platform(s): S60 3rd Edition, S60 3rd Edition FP1, S60 3rd Edition FP2
S60 3rd Edition FP2
S60 3rd Edition FP1
S60 3rd Edition (initial release)
Keywords: TLmkItemIdDbCombiInfo
Created: santeriv (19 Sep 2007)
Last edited: hamishwillee (21 Jun 2012)


The TLmkItemIdDbCombiInfo class provides methods for getting the ID of a landmark or category and the database handle to which the selected landmark or category belongs.

The client application executes methods to get the ID of a landmark and the database handle and then uses those for its internal purposes, such as for modifying the landmark attributes or for renaming the category. Note that the client takes the ownership of the returned database pointer and is responsible for deleting it.

Incorrect use of the Landmarks category selector dialog (CLmkCategorySelectorDlg) results in a memory leak whenever a category or categories are selected.


After selecting a category, the TLmkItemIdDbCombiInfo object contains a pointer to the landmarks database. The client is responsible for deleting this pointer once it is no longer needed.

#include <clmkcategoryselectordlg.h>  // link against lmkcommonui.lib
#include <tlmkitemiddbcombiinfo.h>
CLmkCategorySelectorDlg* dlg = CLmkCategorySelectorDlg::NewL(EFalse);
TLmkItemIdDbCombiInfo selectedItem;
TInt ret = dlg->ExecuteLD(selectedItem);
if( ret != 0 )
// Store the pointer to CPosLandmarkDatabase and
// remember to delete it in the destructor.
// The database pointer is the same for all landmarks
// from the same database.
ilDb = selectedItem.GetLmDb();

See the LocationLandmarksUIRefApp SDK example application for a demonstration on using CLmkCategorySelectorDlg.

This page was last modified on 21 June 2012, at 06:04.
44 page views in the last 30 days.