Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 09-01-2011, 10:45 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 15
matzino is on a distinguished road
Default Reuse UIWebView not good practice?

Hej folks,

I had made my first steps in iphone-programming and a lot of time I use a UIWebView. Today I found this entry on StackOverflow

Reused UIWebView showing previous loaded content for a brief second on iPhone - Stack Overflow
(The Answer from Roi)

And I wonder that an "Apple Developer" say that UIWebView is not ment to be reused. I'm not believe anything that can find in the www, but this make me thoughtful...

Have anyone arguments why reusing is not a good practice or the other way round?

Thanks in advance...

greetz matzino
matzino is offline   Reply With Quote
Old 09-01-2011, 11:17 AM   #2 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

ehm.....if you haven't any particular problem, just reuse, if you see some problems, release it and alloc\init a new UIWebView.....

However I think that can be problems related only to cache....
__________________
dany_dev is offline   Reply With Quote
Old 09-02-2011, 06:23 AM   #3 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 15
matzino is on a distinguished road
Default

The only Problem I had is that the old content is shown for a short period of time till the new content is loaded. But that I had already solved

So on I will reusing UIWebViews in future ...

greetz matzino

Last edited by matzino; 09-02-2011 at 06:27 AM. Reason: spelling mistake
matzino is offline   Reply With Quote
Old 09-07-2011, 03:19 PM   #4 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 241
MattW is on a distinguished road
Default

I always reuse my UIWebView because shutting the instance down causes a leak somewhere in iOS - it's not huge (20K or so, if memory serves), but it's annoying.
__________________

Highlight PDF text like no other app: iHighlight (now available for iPad and iPhone!)
-----
Create iPhone lists with no typing: Insta-List
-----
Make spelling fun, and create your own tests: iWillSpell
-----
A fast, elegant flashlight app: Insta-Light
-----


FourSixteen Productions
MattW is offline   Reply With Quote
Old 09-08-2011, 01:25 AM   #5 (permalink)
Registered Member
 
SundialSoft's Avatar
 
Join Date: Oct 2010
Location: Scotland
Posts: 176
SundialSoft is on a distinguished road
Default

Quote:
Originally Posted by matzino View Post
Hej folks,

I had made my first steps in iphone-programming and a lot of time I use a UIWebView. Today I found this entry on StackOverflow

Reused UIWebView showing previous loaded content for a brief second on iPhone - Stack Overflow
(The Answer from Roi)

And I wonder that an "Apple Developer" say that UIWebView is not ment to be reused. I'm not believe anything that can find in the www, but this make me thoughtful...

Have anyone arguments why reusing is not a good practice or the other way round?

Thanks in advance...

greetz matzino
Hi Matzino, I agree with the person above, reuse your webview to cut down on leaks. There are lots of posts discussing use of webviews to minimise leaks. I only have one webview and use it wherever required.
SundialSoft is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 382
13 members and 369 guests
Absentia, bignoggins, dre, epaga, hussain1982, LunarMoon, momolgtm, Newbie123, omagod, Paul10, pinacate, revg, skog
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,643
Threads: 94,110
Posts: 402,860
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Diligent
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:51 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0