« first day (789 days earlier)      last day (4154 days later) » 

4:00 PM
they SHOULDN'T cause leaking by themselves, as AFAIK they're out of scope for everything once the event source goes out of scope
 
In that case though, the lambda is 100% redundant.
 
scope is the wrong terminology
 
oh for christ's sake, reboot needed...... UPDATES ARE GOING TO MAKE THIS SO SLOOOOOW
Ok guys, watch for the sleigh
 
I can't pin down what I'm trying to say in words, but I think it's clear
 
With the hands and the hat
In a bizzle!
 
4:01 PM
That said, setting the event to null should take care of any leaks.
 
@KendallFrey I know one thing: event <=> target reference should be weak by default and strong by option.
@KendallFrey But it doesnt. Maybe this is Monotouch bug, I don't know.
 
I strongly disagree.
 
Arguments?
Strong reference leads for memory leaks even in WPF.
 
If Delegate.Target was a weak reference, your events could become invalid randomly throughout your app.
 
( . Y . )
 
4:03 PM
You should just test inside on null inside them
It's OOP, we're not stateless, we're always should test for null.
@KendallFrey And strong reference should be option
Easy-to-turn option
 
NO A THOUSAND TIMES NO
 
fuck me
You're obsessed @folex
 
And you can't test for null, because the delegate will crash before you can access it.
 
@KendallFrey WHAAT
Delegate crush? WHY?
 
crash*
Are you Polish?
 
4:05 PM
crash, sorry
@rudi_visser Russian, but that was just type
 
Because it can't access the object it needs to call the method on.
 
Ah Russian, that's awesome
 
typo*
 
Mother Russia kicks ass
Polish people always say 'crush' for some reason
 
Do you ever access Delegate.Target in your code?
 
4:06 PM
@KendallFrey Oh, you're right, sorry
@KendallFrey I do
 
OH GOD NO
You're using multicast delegates and accessing Target?
 
Yep
I don't ever need delegate's of other type
 
@folex You are bursting blood vessels in Kendall's face right now. Don't feel guilty.
Oh I'm back
 
@KendallFrey Why shouldn't I do that?
 
So you pass an Action with multiple methods in its invocation list. What happens?
 
4:09 PM
@rudi_visser "Do you want to get started with Microsoft Web Platform to stay connected with the latest Web Platform Components?" is this that downloader they wrapped everything for IIS 7 in?
That Web Platform INstaller thing?
 
Oh, god, not MethodInfo...
/me dies
 
@KendallFrey It iterates through a collection and calls everything it's had added to it?
 
Why Reflection is so bad?
 
Reflection isn't bad. What you have done is bad.
 
@rudi_visser Oh it is. DISREGARD MY QUESTION.
 
4:11 PM
@Sean Yes.
Fuck this shit I'm going home
 
@rudi_visser kthxbai
 
I've accomplished so many things today
sleighs away
 
That awkward moment when your heart skips a beat because you suddenly think "Oh god, this feature was deprecated in 2008. What if the replacement has been deprecated in 2012?!?!"
 
@KendallFrey It never happens
 
It had better not!
Just like a stupid user better never use my app.
 
4:15 PM
I'm creating one WeakEventHandler for every Target from invocation list
 
aaargh now I have to write off 1.5 hours copying disks!
 
@KendallFrey You sounded like you were scolding a daughter when she becomes ripe for the picking.
 
I just had anger to burn, and there was less-than-ideal code, so flames flew.
 
I understand, everything will be ok.
 
Yeah, I conquered the WPF RichTextBox this week.
 
4:17 PM
BOOM
Was it fun?
 
I have syntax highlighting and a console simulator all in the same app. I R AWSUM
Yes, it was fun, except the non-fun parts.
 
Wheeeee! =D
D=
since when did new -> text document go away?!
 
Oh wait. Only in restricted folders. That you have to supply admin permission for even when logged on as an admin. FUCK YOU WINDOWS
 
linux ftw
We have root, and we have not root. Simple.
(almost)
 
4:19 PM
twitchy eye
 
twitchy [redacted]
 
Speaking of redacted things, I need a wee.
brb
(that rhymes)
 
@KendallFrey why is my method bad? Get invocation list, and for every Target-Method pair create weak delegate.
 
Because it takes a simple concept and completely blows it up and re-implements a shaky (at best) version using random bits of code from the far reaches of the Framework.
 
But I'm doing not exactly that. I'm not even adding anything to invocation list, I'm creating another WeakEventHandler for every +=
 
4:22 PM
So you're reimplementing it differently, but with the same concept.
 
Is there better way to make Target reference weak?
 
@folex Kryptonite.
 
Solve the original problem.
 
Oh I love that.....
 
@KendallFrey For that I need to know how exactly GC treats my code
In other words, I need to see what's wrong with GC's reference tree
 
4:24 PM
When you click the "port" heading to order by port and it's not a number field, but a text field so it orders it alphabetically instead of numerically
 
casts Summon Jon Skeet
 
Have you tried it in .NET?
 
@TomW Your spell fizzles.
 
I can't try that in .NET, I'm using iPhone SDK
 
I'd try to reproduce in both Mono and .NET.
 
4:25 PM
So it should work un unix-based OS (iOS) => no MS .NET
 
DOUBLE SLEIGH
 
if you meant MS .NET
 
or was it triple?!?! I couldn't tell!
 
If .NET works and Monotouch doesn't, go... do something bad to someone.
Just a simple test case, not rewrite your app.
 
@KendallFrey I can't do that simple test case, because I need same objects as in my app
 
4:28 PM
OMFG VS2012 has decent classic asp intellisense!!!!!!!!!!
Not that this is anything I should be excited about cough
Oh. My. God. This is going to make supporting shitty apps soooo much easier
 
@KendallFrey Because it's obvious that ev = null will work correctly in .NET, no need for testing, so problem lays in my code or in Monotouch. I can't test this in .NET.
 
Visual Studio. Supporting shitty apps since 2012
2
Yeah, I'm not sure that is going to stick
 
It might do
 
If it's obvious that it will work in .NET but not Mono, than the fault obviously lies in Mono.
 
' finally, Microsoft creating an honest looking ad'
 
4:31 PM
@KendallFrey or in my code
 
Well, if it works in .NET but not Mono, how could it be your code?
 
I can test just ev = null in .NET, not my app. While error might be in my app, not in monotuch
touch*
 
What I'd do is make a workaround, which you did, but I have a feeling you took the path of least resistance and ended up with a bad problem.
 
I've tried everything else before trying that way. Except submitting bug to Xamarin cause it will took several months to solve it
So, is there any significant better way to make event <=> target reference weak?
 
No, no, no.
What's the original problem?
 
4:35 PM
I get my car back 2moz! w00p w00p
 
I'm getting out of memory.
that's the original problem
 
Have you pinpointed where the memory is going?
 
Yes
mm
Almost yes.
 
@Sean You should use resharper, It's like intellisense but incredible
 
4:37 PM
@JamieTownsend What was wrong with it?
 
And it's being consumed by event handlers not being unsubscribed properly?
 
@KendallFrey I've found EXACTLY place where emory leaks
 
@ChristianStewart I've heard it's battier than my nan, and she had dementia.
 
@KendallFrey yes
 
Have you tried unsubscribing them with -=?
 
4:38 PM
Yes
 
@Sean some 19yr old fat girl who had been driving for 2 weeks crashed into the side of me. I was just happily driving down a straight road and she pulled out of a junction without looking
 
And setting it to null?
 
And invocation list becomes empty
yes
 
Opinions: Is handling the possible Path.GetDirectoryName() exceptions overkill?
                 OpenFileDialog ofd = new OpenFileDialog();
                 try
                 {
                     string lastDbDir = Path.GetDirectoryName(activeModule.DatabaseFile);
                     if (!String.IsNullOrEmpty(lastDbDir))
                         ofd.InitialDirectory = lastDbDir;
                 }
                 catch (ArgumentException)
                 { /*Ignore Path.GetDirectoryName() exceptions*/ }
                 catch (PathTooLongException)
                 { /*Ignore Path.GetDirectoryName() exceptions*/ }
 
Invocation list becomes empty?
 
4:38 PM
@JamieTownsend I told you, bitches be crazy!
 
yes :)
 
Then they should be released.
 
I could of bitch slapped her, I had my baby in the car. Was lucky I was not driving very fast. Could of been a bad crash
 
@walkingTarget If you're only going to ignore them, then yes
 
Then it's not my fault, so it's monotouch's fault, so I should report bug and wait for resolving.
 
4:39 PM
@JamieTownsend Yeah, you're luck there. And you're driving a BM?
So it's basically a tank
 
@Sean Then what if activeModule.DatabaseFile is some bogus string? I get an exception I don't want
 
What was she driving?
 
She was driving a shitty W reg Peugeot or how ever you spell it.
Her car is a right off lol
it bent her chassis, my car just had panel damage
 
@KendallFrey I haven't done that yet because I could not reproduce this bug in simple project. Don't know why. Maybe I'm missing something in structure of my app and haven't repeat that.
...in new simple project
 
@walkingTarget In that case you're probably doing it right. You don't want to catch Exception and ignore it because this could be any valid unexpected exception you do want to know about. But ignoring specific cases is better
 
4:41 PM
OOC, how did you determine where the memory was going?
 
@JamieTownsend That'll certainly teach her
cannot stop reading OOC as "Out Of Character"
 
@Sean Good deal, thanks
 
Oh goddamnit now I have an error and it won't send the message
 
@KendallFrey I knew that the number of cells was the largest, so I'we seen at that number and saw that there is more than ten time more cells in memory than needed
 
4:45 PM
@JamieTownsend Well that doesn't look so bad =]
 
Cells? WTF
 
cells of table
 
@Sean garage quoted 3K lol
 
What does that have to do with event handlers and memory leaks?
 
All the problem was about cells of tables
 
4:46 PM
it was a non-fault claim so they have replaced everything - no filler lol
 
@JamieTownsend THREE THOUSAND MOOLAHS?!?!
 
@KendallFrey Cells is UI object. Like button.
 
I know lol
 
@JamieTownsend Jaysus....
 
And what does that have to do with event handlers and memory leaks?
 
4:46 PM
I had to have a day off work, so another 350 on top for compo lol
 
There is classes that describes cells, they could have events
and they DO have events
 
And you were subscribing to those events.
 
Almost
 
Cell was subscribing her events to some actions
 
4:47 PM
Only thing that has really wound me up @Sean is that I have to pay £500 excess and then wait god knows how many months to get it back
 
@JamieTownsend Yeah that's annoying. I was in a crash as a passenger and the guy completely deserves to be dicked for it. Still waiting for the cash and it was over 2 years ago...
 
@KendallFrey Well, yes.
 
Yeah, so how do you know that the extra cells weren't just happening to to sit around before they got collected?
 
I've tried clean (without any events) cells and they was collected by GC
 
@Sean I had the girls bf come round my house and ask to fix my car rather than go thru insurance... I was like, give me a like for like car to drive around in until then and fine lol
 
4:49 PM
@JamieTownsend Coming straight over a junction, guy sat at the other other side waiting to turn right (to our left). We had right of way, pulled out when the lights changed and the guy waited til we were half way across the junction to pull out and rammed into the side of us. Chevvy Matiz vs Vauxhall people carrier... We got shunted and thrown about like little bitches >_<
 
@Sean bad times !
 
So, a function inside Cell was added to some other event handler?
 
Thankfully my air bags didnt go off as apparently they would of write my car off
 
And this caused a leak?
 
@JamieTownsend Yeah that's the only problem, people don't understand that you need to get to work etc.
 
4:50 PM
@KendallFrey Yes
But the strange thing is that there is A LOT of such events
 
Not only get to work, no way I am driving around in a corsa when I pay 300 quid a month finance for a nice car lol
 
and leack was caused by just one
 
Even after the object firing the event was deleted?
 
dunno how that could be
@KendallFrey Yep
nope
@KendallFrey After event was cleaned
Object, firing event is cell itself
obv
 
@JamieTownsend Haha
 
4:53 PM
A Cell subscribed to its own events???
 
Cell was a Target of this events
 
Yes, but what class was the event declared in?
 
cell
I dont like "someone subscribed" when anonymous function was subscribed. No one was subscribed in real.
One object, one function. "Subscribing" implies using of 2 objects -- subscriber and event-caller and 1 function.
 
An anonymous is just like a normal function except... hmmm... got me there.
 
In my broken mind, ofc
:)
Moreover anonymous function IS the normal function
method isn't
fucking oop :)
 
4:56 PM
It sounds like iOS/Mono/Obj-C or whatever is reference-counted, which causes leaks in circular references.
 
Obj-C reference counted
 
This Cell subscribing to itself is a circular reference.
 
But It could solve circular reference
resolve*
 
but this is Monotouch, isn't it? surely the Mono GC is very similar to the CLR GC
 
So, Cell is a built-in class, right?
 
4:58 PM
anyway, as you know, WeakReference solved that problem, but WeakReference is SGen's information, not Obj-C's Gc information
yep
 
@TomW Monotouch GC == Mono GC.
 
Yes
 
@KendallFrey ...yes?
 
@TomW Sgen in both
Monotouch uses Mono
 
If Cell is a built-in class, how do/did you clear the event?
Also, how do you know it's subscribing to its own event?
 
4:59 PM
hi to all
 

« first day (789 days earlier)      last day (4154 days later) »