Author: jkupec Date: Tue Jul 10 15:23:53 2007 New Revision: 5950 URL: http://svn.opensuse.org/viewcvs/zypp?rev=5950&view=rev Log: releasing media upon MediaSetAccess destruction Modified: branches/REFACTORING-10_3/libzypp/zypp/MediaSetAccess.cc branches/REFACTORING-10_3/libzypp/zypp/MediaSetAccess.h Modified: branches/REFACTORING-10_3/libzypp/zypp/MediaSetAccess.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/MediaSetAccess.cc?rev=5950&r1=5949&r2=5950&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/MediaSetAccess.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/MediaSetAccess.cc Tue Jul 10 15:23:53 2007 @@ -38,6 +38,10 @@ MediaSetAccess::~MediaSetAccess() { + DBG << "Releasing all media IDs held by this MediaSetAccess" << endl; + media::MediaManager manager; + for (MediaMap::const_iterator m = _medias.begin(); m != _medias.end(); ++m) + manager.release(m->second); } Modified: branches/REFACTORING-10_3/libzypp/zypp/MediaSetAccess.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/MediaSetAccess.h?rev=5950&r1=5949&r2=5950&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/MediaSetAccess.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/MediaSetAccess.h Tue Jul 10 15:23:53 2007 @@ -57,6 +57,8 @@ * checks if the media we are trying to access is the desired one. See * \ref MediaVerifierBase for more info. * + * Media gets released (unmounted) upon destruction of MediaSetAccess object. + * * Code example: * \code * Url url("dir:/path/to/cdset/sources/openSUSE-10.3/Alpha2plus/CD1"); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org